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 451102
To read all comments associated with this story, please click here.
Comment by kvarbanov
by kvarbanov on Thu 25th Nov 2010 09:16 UTC
kvarbanov
Member since:
2008-06-16

PS1="[\t][\u@\H:\w:`pwd`]\r\n$ " does a pretty decent job - it displays the time stamp, the current folder, and there's a lot of space for roomy commands after the $ sign. Suse users can replace it with the #, if they want. Lots of options, really. I also use "export HISTTIMEFORMAT="%F %T ", so both look like this :
[11:14:57][user@host:~/docs:/home/user]
$
and
1003 2010-11-25 11:15:13 history

Reply Score: 1