Linked by Shane on Wed 24th Nov 2010 22:40 UTC
General Development "It is sometimes hard to form a mental model of a directory tree when working with the command line. GUI shells tend to provide more visual cues. So, like a lot of Bash users, I used to get around this by printing the current working directory in my shell prompt. However, things can get pretty cramped when dealing with deeply nested directories. A better solution is needed."
Permalink for comment 451070
To read all comments associated with this story, please click here.
To each his (or her) own
by bosco_bearbank on Thu 25th Nov 2010 00:33 UTC
Member since:

For a normal user:
PS1='\[\033[01;32m\]\w$\[\033[00m\] '
And for root:
PS1='\[\033[01;31m\]\w#\[\033[00m\] '

Works for me, which, after all, is all that matters.

Reply Score: 1