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 451053
To read all comments associated with this story, please click here.
Why not set the GUI terminal title?
by Hypnos on Wed 24th Nov 2010 22:58 UTC
Member since:

I don't use OSX -- does not support the escape sequence to set the GUI terminal title? If indeed it does, I think that's a better option for showing long working directory paths.

I use the following bash prompt on my Linux desktop:

export PS1="\[\033]0;\u:<\w>\007\]\n\[\033[01;33m\] > \[\033[00m\]"

This puts all the info into the GUI terminal titlebar, and the only prompt I have in the terminal is a neatly separated > .

Reply Score: 1