News for hackers. Stuff that matters.
Re:Interesting Bash Prompts by viraptor on Sunday September 06, 2009 @07:52AM (#807727)
I'm tried to minimise the length of "user@host fullpath" too. This is what I ended up with (in zsh):

    PS1='[%(?..%?)%(?.. ! )$PR_GREEN%2>>%n%<<@%m$PR_NO_COLOR $PR_BLUE%30<...<%~%<<$PR_NO_COLOR]%(!.#.$) '
path is limited to 30 characters and the front is trimmed with '...'. There is a host, because I work on at least 5 at the same time every day, but the username is cut to only the first 2 letters (so it's either vi, or ro, or something else at uni). The return code is only visible when it's non-zero.

There are no comments on this comment yet.