mirror of
https://github.com/arcan1s/dotfiles.git
synced 2025-07-10 04:15:50 +00:00
rename files to zsh
This commit is contained in:
27
zsh/prompt_server.zsh
Normal file
27
zsh/prompt_server.zsh
Normal file
@ -0,0 +1,27 @@
|
||||
# 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%}"
|
||||
}
|
Reference in New Issue
Block a user