mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
fixed prompt not reverting correctly to INSERT mode in syl20bnr.zsh-theme
This commit is contained in:
parent
389af0d10c
commit
a037330f87
1 changed files with 3 additions and 5 deletions
|
|
@ -45,14 +45,12 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
|
|||
# Format for VI mode
|
||||
INSERT_MODE="%{$GREEN%}-- INSERT --"
|
||||
NORMAL_MODE="%{$RED%}-- NORMAL --"
|
||||
VI_PROMPT="$INSERT_MODE"
|
||||
function zle-keymap-select {
|
||||
VI_PROMPT="${${KEYMAP/vicmd/$NORMAL_MODE}/(main|viins)/$INSERT_MODE}"
|
||||
zle reset-prompt
|
||||
function vi_mode_prompt_info() {
|
||||
echo "${${KEYMAP/vicmd/$NORMAL_MODE}/(main|viins)/$INSERT_MODE}"
|
||||
}
|
||||
|
||||
# Prompt format
|
||||
PROMPT='
|
||||
%{$BLUE_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
||||
${VI_PROMPT} ➤%{$RESET_COLOR%} '
|
||||
$(vi_mode_prompt_info) ➤%{$RESET_COLOR%} '
|
||||
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue