Smart pwd command: prints out full-chain symbolic link if that’s how you got to the working directory:
#!/bin/bash
DASHLPATH=$(pwd -L)
DASHPPATH=$(pwd -P)
if [[ $DASHLPATH != $DASHPPATH ]]; then
echo $DASHLPATH "=>" $DASHPPATH
else
/bin/pwd
fi
Must alias “pwd” to <script-path> for it to replace system pwd command. Runs system pwd if no symlink.