in zsh you can have a %# in your PS1 (or whatever PROMPT variable) which basically means display % if user or display # if root. I'm wondering if there is any way to affect this so that the % or # changes colors depending on whether it's a user or root (a red for root, a blue for user ) the obvious way is just to change the PS1 in my root's ~/.zshrc but considering this is already a special symbol I'm wondering if there isn't perhaps a way I can use the same PS1 for both... something specific to %# like it is for zsh ( I'm sure there are other hacks I could do too like an if then statement ).
|
|
||||
|
|
|
That should work to change the hostname ( Here's why:
http://www.nparikh.org/unix/prompt.php has more options and details around the color tables and other available options for zsh. |
|||
|
|
|
|||
|
|