# PROMPT && RPROMPT if [[ $EUID == 0 ]]; then # [root@host dir]# PROMPT="%{$fg_bold[white]%}[%{$reset_color%}\ %{$fg_bold[red]%}%n%{$reset_color%}\ %{$fg_bold[white]%}@%{$reset_color%}\ %{$fg_no_bold[blue]%}%M %{$reset_color%}\ %{$fg_bold[yellow]%}%1/%{$reset_color%}\ %{$fg_bold[white]%}]# %{$reset_color%}" else # [user@host dir]$ PROMPT="%{$fg_bold[white]%}[%{$reset_color%}\ %{$fg_bold[green]%}%n%{$reset_color%}\ %{$fg_bold[white]%}@%{$reset_color%}\ %{$fg_no_bold[blue]%}%M %{$reset_color%}\ %{$fg_bold[yellow]%}%1/%{$reset_color%}\ %{$fg_bold[white]%}]$ %{$reset_color%}" fi precmd() { # last command returncode="%(?.%{$fg[green]%}.%{$fg[red]%})%?%{$resetcolor%}" RPROMPT="%{$fg_bold[white]%}[%{$reset_color%}\ %{$fg_bold[cyan]%}%T%{$reset_color%}\ %{$fg_bold[white]%}][%{$reset_color%}"\ ${returncode}\ "%{$fg_bold[white]%}]%{$reset_color%}" }