mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-12-23 11:12:48 +01:00
zshrc: help @Mkaysi to add exit status to prompt
This commit is contained in:
parent
05b44c7cc5
commit
0716ec9731
15
zshrc
15
zshrc
@ -13,12 +13,21 @@ uname=`uname`
|
|||||||
# This is based on zshrc which came with Debian (Third option in wizard for new users.)
|
# This is based on zshrc which came with Debian (Third option in wizard for new users.)
|
||||||
|
|
||||||
# Set up the prompt
|
# Set up the prompt
|
||||||
|
|
||||||
autoload -Uz promptinit
|
autoload -Uz promptinit
|
||||||
# Green for normal user and red for root. Thank you nyuszika7h
|
|
||||||
|
# Green for normal user and red for root and show exit status
|
||||||
|
# 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 %~
|
PS1="%B%(!.%F{red}.%F{green})%n@%m %~
|
||||||
%#%f%b "
|
%# %(?..%B%?%b )%f%b"
|
||||||
|
|
||||||
setopt histignorealldups sharehistory
|
setopt histignorealldups sharehistory
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user