Fix initial line redraw issue
This commit is contained in:
parent
3be6b26cd0
commit
d515d140f5
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue