ash: show current directory in terminal
Unlike bash, ash has no PROMPT_COMMAND variable, so if you want the current directory to show up in your terminal window's title bar (or the name of your PuTTY window), here's what to add to ~.profile:
HOSTNAME=`hostname`
PS1='`echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"`\u@\h \w '
After that, just log out and back in, or source ~/.profile
and you're all set. Makes going through multiple windows with Alt-Tab that much more pleasant.
Written by Enno Rehling
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#