diff options
-rw-r--r-- | zsh/.zshrc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,7 +1,14 @@ autoload -U colors && colors -PS1="%B%{$fg[white]%}[%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " bindkey -e +# Shell prompt +if [ $(id -u) -eq 0 ]; +then # you are root, set red colour prompt + PS1="%B%{$fg[white]%}[%{$fg[red]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " +else + PS1="%B%{$fg[white]%}[%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[green]%}%M %{$fg[yellow]%}%~%{$fg[white]%}]%{$reset_color%}$%b " +fi + # History in cache directory: export HISTSIZE=10000 export SAVEHIST=10000000 |