mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-12-23 03:02:52 +01:00
zshrc: elite2 green for user, elite2 red for root
This commit is contained in:
parent
b4787fb7c0
commit
b19551e8b4
17
rc/zshrc
17
rc/zshrc
@ -49,19 +49,14 @@ setopt SHARE_HISTORY
|
||||
# Set up the prompt
|
||||
autoload -Uz promptinit
|
||||
|
||||
# Green for normal user and red for root and show exit status
|
||||
# if it's not 0. Thank you nyuszika7h
|
||||
# Green for normal user and red for root
|
||||
promptinit
|
||||
#autoload -Uz vcs_info
|
||||
autoload -Uz colors && colors
|
||||
setopt PROMPT_SUBST
|
||||
#zstyle ':vcs_info:*' check-for-changes true
|
||||
#zstyle ':vcs_info:*' enable git svn bzr hg
|
||||
#zstyle ':vcs_info:*' formats '%b '
|
||||
#precmd() { vcs_info }
|
||||
|
||||
PS1="%B%(!.%F{red}.%F{green})%n@%m %~
|
||||
%# %(?..%B%?%b )%f%b"
|
||||
if [ $USER = "root" ]; then
|
||||
prompt elite2 red
|
||||
else
|
||||
prompt elite2 green
|
||||
fi
|
||||
|
||||
# Use emacs keybindings even if our EDITOR is set to vi
|
||||
bindkey -e
|
||||
|
Loading…
Reference in New Issue
Block a user