1
0
Fork 0
mirror of synced 2024-11-16 04:55:35 -05:00

Implement config variable

This allows for an env variable of ZIM_PROMPT_INSERTMODE to be set
to determine if an indicator is shown.
This commit is contained in:
Colin Jamison 2017-01-21 18:10:32 +01:00
parent 2a1a3cd45a
commit 4a373bca4a
4 changed files with 5 additions and 7 deletions

View file

@ -141,7 +141,7 @@ prompt_eriner_main() {
prompt_eriner_precmd() {
vcs_info
PROMPT='%{%f%b%k%}$(prompt_eriner_main) '
RPROMPT="${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}"
RPROMPT="${ZIM_PROMPT_INSERTMODE:+${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}}"
}
zle-keymap-slect() {

View file

@ -15,7 +15,8 @@ prompt_gitster_get_pwd() {
prompt_gitster_precmd() {
[[ ${+functions[git-info]} ]] && git-info
RPROMPT="${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}"
PROMPT='$(prompt_gitster_get_status)%F{white}$(prompt_gitster_get_pwd)${(e)git_info[prompt]}%f '
RPROMPT="${ZIM_PROMPT_INSERTMODE:+${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}}"
}
zle-keymap-select() {
@ -39,9 +40,6 @@ prompt_gitster_setup() {
zstyle ':zim:git-info:dirty' format '%F{yellow}✗'
zstyle ':zim:git-info:keys' format \
'prompt' ' %F{cyan}%b%c %C%D'
PROMPT='$(prompt_gitster_get_status)%F{white}$(prompt_gitster_get_pwd)${(e)git_info[prompt]}%f '
RPROMPT=''
}
prompt_gitster_setup "$@"

View file

@ -45,7 +45,7 @@ prompt_magicmace_precmd() {
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)/}"
RPROMPT="${ZIM_PROMPT_INSERTMODE:+${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}}"
}
zle-keymap-select() {

View file

@ -40,7 +40,7 @@ prompt_steeef_precmd() {
vcs_info 'prompt'
fi
RPROMPT="${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}"
RPROMPT="${ZIM_PROMPT_INSERTMODE:+${${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}%}
%(!.#.$) '