mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-16 02:27:03 +01:00
fixed a bug when launching a new terminal instance in syl20bnr.zsh-theme
This commit is contained in:
parent
a037330f87
commit
d5b51b48d4
1 changed files with 7 additions and 3 deletions
|
|
@ -45,12 +45,16 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
|
||||||
# Format for VI mode
|
# Format for VI mode
|
||||||
INSERT_MODE="%{$GREEN%}-- INSERT --"
|
INSERT_MODE="%{$GREEN%}-- INSERT --"
|
||||||
NORMAL_MODE="%{$RED%}-- NORMAL --"
|
NORMAL_MODE="%{$RED%}-- NORMAL --"
|
||||||
function vi_mode_prompt_info() {
|
VI_PROMPT="$INSERT_MODE"
|
||||||
echo "${${KEYMAP/vicmd/$NORMAL_MODE}/(main|viins)/$INSERT_MODE}"
|
function zle-keymap-select zle-line-init zle-line-finish {
|
||||||
|
VI_PROMPT="${${KEYMAP/vicmd/$NORMAL_MODE}/(main|viins)/$INSERT_MODE}"
|
||||||
|
zle reset-prompt
|
||||||
|
zle -R
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prompt format
|
# Prompt format
|
||||||
PROMPT='
|
PROMPT='
|
||||||
%{$BLUE_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
%{$BLUE_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
||||||
$(vi_mode_prompt_info) ➤%{$RESET_COLOR%} '
|
$VI_PROMPT ➤%{$RESET_COLOR%} '
|
||||||
|
|
||||||
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$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