The data analysis server that I work with tends to have very long directory and file names, and often as I'm crunching through the data, it gets a bit hard to see where I'm at. To combat this, I've colorized my bash prompt. I also added a newline character at the beginning of the prompt so that I get a little whitespace in there to help. This works great except in cases where the path is so long that it has to wrap. In that case, it partially wraps, then breaks and continues on a new line:
Code:
[ user@Host:~/this.this.going.to.be.one.long/director.that.I.need.to.see/if.i.can.fit.into.the.prompt/test/test/test/te
st/te
st/another/long/dir/structure/to/add/to/the/prompt ] $
the PS1 format I'm using is as follows:
Code:
PS1='\n\[\033[01;31m\]$(statstring)\[\033[00m\][ ${debian_chroot:+($debian_chroot)}\[\033[01;96m\]\u@\h\[\033[00m\]:\[\033[01;93m\]\w\[\033[00m\] ] \$ '
If I remove the newline at the beginning, I don't have any wrapping problems, but I've really grown to like this prompt as it definitely helps reading.
Any suggestions as to what I might be doing wrong, and / or any suggestions as to how I can get a newline so that output looks more like:
Code:
[ user@Host:~ ] $ ls
Downloads miscProgs perl_source Public Videos
[ user@Host:~ ] $
Bookmarks