Clean and comment prompt definition

This commit is contained in:
lhark 2015-11-24 21:33:49 +01:00
parent 5aaf602401
commit d5226b370c

33
zshrc
View file

@ -153,13 +153,13 @@ case ${SOLARIZED_THEME:-dark} in
esac esac
local ZSH_THEME_GIT_PROMPT_PREFIX="%{%K{${bkg}}$fg_bold[green]%}[%{$fg_bold[blue]%}" local ZSH_THEME_GIT_PROMPT_PREFIX="%{%K{${bkg}}$fg_bold[green]%}[%{$fg_bold[blue]%}"
local ZSH_THEME_GIT_PROMPT_SUFFIX="%{%K{${bkg}}$fg_bold[green]%}]%K{${bkg}}" local ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[green]%}]"
local ZSH_THEME_GIT_PROMPT_CLEAN="%{%K{${bkg}}$fg_bold[green]%}✓%{$reset_color%}" local ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_no_bold[green]%}✓"
local ZSH_THEME_GIT_PROMPT_AHEAD="%{%K{${bkg}}$fg[cyan]%}▴%{$reset_color%}" local ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}▴"
local ZSH_THEME_GIT_PROMPT_BEHIND="%{%K{${bkg}}$fg[magenta]%}▾%{$reset_color%}" local ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg_no_bold[magenta]%}▾"
local ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[green]%K{${bkg}}%}●%{$reset_color%}" local ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_no_bold[green]%}"
local ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[yellow]%K{${bkg}}%}●%{$reset_color%}" local ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_no_bold[yellow]%}"
local ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%K{${bkg}}%}●%{$reset_color%}" local ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_no_bold[red]%}●"
local ZSH_THEME_VIRTUALENV_PREFIX=" %{$fg_bold[green]%}(%{%b%K{${bkg}}$fg[green]%}" local ZSH_THEME_VIRTUALENV_PREFIX=" %{$fg_bold[green]%}(%{%b%K{${bkg}}$fg[green]%}"
local ZSH_THEME_VIRTUALENV_SUFFIX="%{$reset_color%K{${bkg}}$fg_bold[green]%})%{$reset_color%K{${bkg}}%}" local ZSH_THEME_VIRTUALENV_SUFFIX="%{$reset_color%K{${bkg}}$fg_bold[green]%})%{$reset_color%K{${bkg}}%}"
@ -305,19 +305,34 @@ setopt promptsubst
# Prompt display # # Prompt display #
################################################################################ ################################################################################
# Carriage return to give the prompt some air
PROMPT="%{$reset_color%} PROMPT="%{$reset_color%}
" "
# Username, red when logged as root
PROMPT+="%{%K{${bkg}}%}"'$_USERNAME' PROMPT+="%{%K{${bkg}}%}"'$_USERNAME'
# @ symbol
PROMPT+="%{$fg_bold[blue]%}@" PROMPT+="%{$fg_bold[blue]%}@"
# Hostname, colors defined just above
PROMPT+="%{$fg_bold[$couleur_hote]%}"'%m' PROMPT+="%{$fg_bold[$couleur_hote]%}"'%m'
# White space to separate host from pwd
PROMPT+=" %{$reset_color%K{${bkg}}%}" PROMPT+=" %{$reset_color%K{${bkg}}%}"
# Current working directory, use ~ when needed
PROMPT+="%{$fg[yellow]%}"'%~' PROMPT+="%{$fg[yellow]%}"'%~'
# Change the background for the whole line and line feed
PROMPT+="%{$fg_bold[green]%} %E PROMPT+="%{$fg_bold[green]%} %E
" "
PROMPT+='%{%K{${bkg}}%}$(_prompt_chars) %{%k%}%{$reset_color%}'
# Prompt characters for virtualenv, git and zsh
PROMPT+="%{%K{${bkg}}%}$(_prompt_chars) %{$reset_color%}"
RPROMPT='$(space_sh_git_prompt)%E%{$reset_color%}' # Right prompt with current repo informations
RPROMPT="$(space_sh_git_prompt)%E%{$reset_color%}"
#PROMPT="$Heure $Utilisateur@$Machine %{$fg_no_bold[yellow]%}%~ #PROMPT="$Heure $Utilisateur@$Machine %{$fg_no_bold[yellow]%}%~
#%{$reset_color%}%# " #%{$reset_color%}%# "