mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-01-09 20:02:31 +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
|
# Set up the prompt
|
||||||
autoload -Uz promptinit
|
autoload -Uz promptinit
|
||||||
|
|
||||||
# Green for normal user and red for root and show exit status
|
# Green for normal user and red for root
|
||||||
# if it's not 0. Thank you nyuszika7h
|
|
||||||
promptinit
|
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 %~
|
if [ $USER = "root" ]; then
|
||||||
%# %(?..%B%?%b )%f%b"
|
prompt elite2 red
|
||||||
|
else
|
||||||
|
prompt elite2 green
|
||||||
|
fi
|
||||||
|
|
||||||
# Use emacs keybindings even if our EDITOR is set to vi
|
# Use emacs keybindings even if our EDITOR is set to vi
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
Loading…
Reference in New Issue
Block a user