[nycbug-talk] what are your usefull hacks, the real simple ones
Ah Pook
ahpook at verizon.net
Mon May 8 12:00:56 EDT 2006
On Monday 08 May 2006 11:37 am, Ray Lai wrote:
> in my .profile, which gives me prompts like:
>
> ray at x[~] cd tmp
> ray at x[~/tmp] cd /tmp
> ray at x[/tmp]
For bash, I have
PS1="\[ [1;34m\]\u\[ [37m\]@\[ [0;35m\]\h \[ [1;37m\]\w$\[ [0m\] "
Same thing, pretty much. I'd cry without colour codes - different
colours for each host helps immensely when you're ssh'ing around all
day. I'm always blue, root is always red.
> Oh, and half the fun was figuring out how it worked.
Fun, hmm? :-) I remember spending (too) many hours trying to get bash,
ksh, and zsh to show the same thing. It's one of those things that you
get working and never touch again, if you're lucky. zsh:
export PROMPT="%{^[[1;34m%}%n%{^[[37m%}@^[[36m%m %{^[[37m%}%d$%{^[[0m%}
"
More information about the talk
mailing list