diff --git a/modules/prompt/themes/eriner.zsh-theme b/modules/prompt/themes/eriner.zsh-theme index d703a1b..4fefd26 100644 --- a/modules/prompt/themes/eriner.zsh-theme +++ b/modules/prompt/themes/eriner.zsh-theme @@ -27,7 +27,6 @@ PRIMARY_FG=black function { local LC_ALL="" LC_CTYPE="en_US.UTF-8" SEGMENT_SEPARATOR="\ue0b0" - NORM_INDICATOR="\ue0b1" PLUSMINUS="\u00b1" BRANCH="\ue0a0" DETACHED="\u27a6" @@ -55,11 +54,7 @@ prompt_segment() { # End the prompt, closing any open segments prompt_end() { if [[ -n $CURRENT_BG ]]; then -<<<<<<< HEAD - print -n "%{%k%F{${CURRENT_BG}}%}${${KEYMAP/vicmd/${NORM_INDICATOR}}/(main|viins)/${SEGMENT_SEPARATOR}}" -======= - print -n "%{%k%F{${CURRENT_BG}}%}${${KEYMAP/vicmd/$NORM_INDICATOR}/(main|viins)/$SEGMENT_SEPARATOR}" ->>>>>>> parent of 55ea696... RPROMPT Method + print -n "%{%k%F{${CURRENT_BG}}%}${SEGMENT_SEPARATOR}" else print -n "%{%k%}" fi @@ -144,18 +139,9 @@ prompt_eriner_main() { prompt_end } -prompt_eriner_precmd() { - vcs_info -} - function zle-keymap-select zle-line-init { PROMPT="%{%f%b%k%}$(prompt_eriner_main)" -<<<<<<< HEAD - RPROMPT= -======= -# local INSM="$TEMP" - #local NORM="$TEMP%{%F{red}%}" ->>>>>>> parent of 55ea696... RPROMPT Method + RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}" zle reset-prompt } @@ -165,7 +151,6 @@ prompt_eriner_setup() { prompt_opts=(cr subst percent) -# add-zsh-hook precmd prompt_eriner_precmd zle -N zle-keymap-select zle -N zle-line-init diff --git a/modules/prompt/themes/gitster.zsh-theme b/modules/prompt/themes/gitster.zsh-theme index 9a3bc32..aa4dc0b 100644 --- a/modules/prompt/themes/gitster.zsh-theme +++ b/modules/prompt/themes/gitster.zsh-theme @@ -14,8 +14,10 @@ gst_get_pwd() { print ${prompt_short_dir} } -prompt_gitster_precmd() { +function zle-line-init zle-keymap-select 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() { @@ -26,7 +28,9 @@ 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 bce1a87..67102c2 100644 --- a/modules/prompt/themes/magicmace.zsh-theme +++ b/modules/prompt/themes/magicmace.zsh-theme @@ -46,6 +46,12 @@ prompt_magicmace_precmd() { fi } +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)/}" + zle reset-prompt +} + prompt_magicmace_setup() { autoload -Uz colors && colors autoload -Uz add-zsh-hook @@ -62,9 +68,8 @@ prompt_magicmace_setup() { zstyle ':zim:git-info:keys' format \ 'prompt' '─[${COLOR_NORMAL}%b%c%D%A%B${COLOR_USER_LEVEL}]' - # Call git directly, ignoring aliases under the same name. - PROMPT='${COLOR_USER_LEVEL}$(prompt_magicmace_status)[${COLOR_NORMAL}$(short_pwd)${COLOR_USER_LEVEL}]${(e)git_info[prompt]}── ─%f ' - RPROMPT='' + zle -N zle-line-init + zle -N zle-keymap-select } prompt_magicmace_setup "$@"