diff --git a/modules/prompt/functions/prompt_sorin_setup b/modules/prompt/functions/prompt_sorin_setup index c3302ad1..8be9d507 100644 --- a/modules/prompt/functions/prompt_sorin_setup +++ b/modules/prompt/functions/prompt_sorin_setup @@ -3,6 +3,7 @@ # # Authors: # Sorin Ionescu +# Pascal Richier # # Screenshots: # http://i.imgur.com/nBEEZ.png @@ -71,11 +72,39 @@ function prompt_sorin_setup { 'prompt' ' %F{blue}git%f$(coalesce "%b" "%p" "%c")%s' \ 'rprompt' '%A%B%S%a%d%m%r%U%u' + # Set User & Host + local userhost=${1:-''} + if [[ $userhost = "userhost" ]]; then + userhost='%B%F{green}[%F{yellow}%n%f@%F{red}%m%F{green}]%b' + else + userhost='' + fi + # Define prompts. - PROMPT='%F{cyan}${_prompt_sorin_pwd}%f${git_info:+${(e)git_info[prompt]}}%(!. %B%F{red}#%f%b.)${editor_info[keymap]} ' + PROMPT=$userhost'%F{cyan}${_prompt_sorin_pwd}%f${git_info:+${(e)git_info[prompt]}}%(!. %B%F{red}#%f%b.)${editor_info[keymap]} ' RPROMPT='${editor_info[overwrite]}%(?:: %F{red}⏎%f)${VIM:+" %B%F{green}V%f%b"}${git_info[rprompt]}' SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' } +function prompt_sorin_help { + cat <