diff --git a/modules/prompt/themes/gitster.zsh-theme b/modules/prompt/themes/gitster.zsh-theme index aa4dc0b..289646f 100644 --- a/modules/prompt/themes/gitster.zsh-theme +++ b/modules/prompt/themes/gitster.zsh-theme @@ -14,10 +14,13 @@ gst_get_pwd() { print ${prompt_short_dir} } -function zle-line-init zle-keymap-select prompt_gitster_precmd() { +function zle-line-init zle-keymap-select { + prompt_gitster_precmd + zle reset-prompt +} +prompt_gitster_precmd() { PROMPT='$(gst_get_status) %F{white}$(gst_get_pwd) $(git_prompt_info)%f ' RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}" - zle reset-prompt } prompt_gitster_setup() { @@ -28,7 +31,7 @@ prompt_gitster_setup() { autoload -Uz add-zsh-hook - #add-zsh-hook precmd prompt_gitster_precmd + add-zsh-hook precmd prompt_gitster_precmd zle -N zle-keymap-select zle -N zle-line-init prompt_opts=(cr subst percent) diff --git a/modules/prompt/themes/magicmace.zsh-theme b/modules/prompt/themes/magicmace.zsh-theme index 67102c2..cec1d15 100644 --- a/modules/prompt/themes/magicmace.zsh-theme +++ b/modules/prompt/themes/magicmace.zsh-theme @@ -44,11 +44,12 @@ prompt_magicmace_precmd() { if [[ ${+functions[git-info]} ]]; then git-info fi + PROMPT='${COLOR_USER_LEVEL}$(prompt_magicmace_status)[${COLOR_NORMAL}$(short_pwd)${COLOR_USER_LEVEL}]${(e)git_info[prompt]}── ─%f ' + RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}" } function zle-line-init zle-keymap-select { - PROMPT='${COLOR_USER_LEVEL}$(prompt_magicmace_status)[${COLOR_NORMAL}$(short_pwd)${COLOR_USER_LEVEL}]${(e)git_info[prompt]}── ─%f ' - RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}" + prompt_magicmace_precmd zle reset-prompt } diff --git a/modules/prompt/themes/steeef.zsh-theme b/modules/prompt/themes/steeef.zsh-theme index 6feb71e..b66d0d1 100644 --- a/modules/prompt/themes/steeef.zsh-theme +++ b/modules/prompt/themes/steeef.zsh-theme @@ -40,13 +40,14 @@ prompt_steeef_precmd() { vcs_info 'prompt' fi + RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}" PROMPT=' %{$purple%}%n${${reset_color}%} at %{$orange%}%m${${reset_color}%} in %{$limegreen%}%~${${reset_color}%} $vcs_info_msg_0_$(virtualenv_info)%{${reset_color}%} %(!.#.$) ' } function zle-line-init zle-keymap-select { - RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}" + prompt_steeef_precmd zle reset-prompt }