1
0
Fork 0
mirror of synced 2024-11-15 20:48:57 -05:00
This commit is contained in:
Colin Jamison 2017-01-29 22:33:56 +00:00 committed by GitHub
commit 8c288356ac
4 changed files with 34 additions and 6 deletions

View file

@ -141,6 +141,12 @@ prompt_eriner_main() {
prompt_eriner_precmd() {
vcs_info
PROMPT='%{%f%b%k%}$(prompt_eriner_main) '
RPROMPT="${ZIM_PROMPT_INSERTMODE:+${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}}"
}
zle-keymap-slect() {
prompt_eriner_precmd
zle reset-prompt
}
prompt_eriner_setup() {
@ -149,7 +155,9 @@ prompt_eriner_setup() {
prompt_opts=(cr subst percent)
add-zsh-hook precmd prompt_eriner_precmd
add-zsh-hook prompt_eriner_precmd
[[ "$ZIM_PROMPT_INSERTMODE" != '' ]] && zle -N zle-keymap-select
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes false

View file

@ -15,6 +15,13 @@ prompt_gitster_get_pwd() {
prompt_gitster_precmd() {
[[ ${+functions[git-info]} ]] && git-info
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() {
prompt_gitster_precmd
zle reset-prompt
}
prompt_gitster_setup() {
@ -24,6 +31,8 @@ prompt_gitster_setup() {
prompt_opts=(cr percent subst)
add-zsh-hook precmd prompt_gitster_precmd
[[ "$ZIM_PROMPT_INSERTMODE" != '' ]] && zle -N zle-keymap-select
zstyle ':zim:git-info:branch' format '%b'
zstyle ':zim:git-info:commit' format '%c'
@ -31,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

@ -44,6 +44,13 @@ 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="${ZIM_PROMPT_INSERTMODE:+${${KEYMAP/vicmd/[NORMAL]}/(main|viins)/}}"
}
zle-keymap-select() {
prompt_magicmace_precmd
zle reset-prompt
}
prompt_magicmace_setup() {
@ -54,6 +61,8 @@ prompt_magicmace_setup() {
add-zsh-hook precmd prompt_magicmace_precmd
[[ "$ZIM_PROMPT_INSERTMODE" != '' ]] && zle -N zle-keymap-select
zstyle ':zim:git-info:branch' format '%b'
zstyle ':zim:git-info:commit' format '%c...'
zstyle ':zim:git-info:dirty' format '*'
@ -63,8 +72,6 @@ prompt_magicmace_setup() {
'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=''
}
prompt_magicmace_setup "$@"

View file

@ -40,11 +40,17 @@ prompt_steeef_precmd() {
vcs_info 'prompt'
fi
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}%}
%(!.#.$) '
}
zle-keymap-select() {
prompt_steeef_precmd
zle reset-prompt
}
prompt_steeef_setup() {
#use extended color pallete if available
if [[ ${TERM} == *256* || ${TERM} == *rxvt* ]]; then
@ -96,6 +102,7 @@ prompt_steeef_setup() {
add-zsh-hook preexec steeef_preexec
add-zsh-hook chpwd steeef_chpwd
add-zsh-hook precmd prompt_steeef_precmd
[[ "$ZIM_PROMPT_INSERTMODE" != '' ]] && zle -N zle-keymap-select
prompt_opts=(cr subst percent)
}