Wherever I go, I like to set prompt to display the current directory. I mean the complete path of current directory, not just the last element, and they all must be in one single line.
This is good:
/usr/bin/X11 >Avoid this:
bash-3.2$ cd /usr/bin/X11
localhost$ cd /usr/bin
tcsh, I have this in my
set prompt="%/ > "For
bash, include this in
PS1="\w > ", Or you can also run
export PS1="\w > "from a bash terminal.
1. I don't need to type
pwd100s times a day. I don't even remember when was the last time I typed
2. I can easily copy the current working directory and pasted it elsewhere. Notice the trailing space in the value of
PS1? With them I can simply double-click the path to select and copy it.