aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshrc9
1 files changed, 8 insertions, 1 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 9105e9b..69afe27 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -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