mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-04-24 07:57:18 +00:00
28 lines
862 B
Plaintext
28 lines
862 B
Plaintext
# 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%}"
|
|
}
|