Re:My 10 UNIX Command Line Mistakes
by wglb on Sunday February 27, 2011 @11:10AM
(#2268074)
Have you considered using 'screen' instead?
[ Parent
| on HN ]
I find a prompt better than a status line for reminding one of where one is, much like including the CWD in the prompt.
I use a similar style:
[alfie] ~$
[rupert] ~$
etc. for my SSH connections, but not for local shells, even though I also use screen. I also use color-coded prompts for selecting particular PATH and other environment variable setups for different branches of our corporate dev tree, to remind myself which compiler etc. I'm using.This is one of my strategies too (along with screen labels). Add to ~/.bash_profile :
PS1="\[\033[0m\](\[\033[0;36m\]\u\[\033[0m\]@\[\033[0;33m\]\h\[\033[0m\])(\[\033[1;34m\]\w\[\033[0;0;0m\])"
I really don't see how these are connected. You could easily have one screen window open and type a command into it absent mindedly without realizing it's not your laptop's shell.
If you're not using captions w/ screen, then you're not using screen.
Try adding to ~/.screenrc
caption always "| %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"