1
0
Fork 0
mirror of synced 2024-11-12 11:08:58 -05:00

Revert "RPROMPT Method"

This reverts commit 55ea696cb0.
This commit is contained in:
Colin Jamison 2017-01-18 19:26:57 +01:00
parent 95e7ce9b1f
commit 474f7d2447
3 changed files with 16 additions and 22 deletions

View file

@ -27,7 +27,6 @@ PRIMARY_FG=black
function {
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
SEGMENT_SEPARATOR="\ue0b0"
NORM_INDICATOR="\ue0b1"
PLUSMINUS="\u00b1"
BRANCH="\ue0a0"
DETACHED="\u27a6"
@ -55,11 +54,7 @@ prompt_segment() {
# End the prompt, closing any open segments
prompt_end() {
if [[ -n $CURRENT_BG ]]; then
<<<<<<< HEAD
print -n "%{%k%F{${CURRENT_BG}}%}${${KEYMAP/vicmd/${NORM_INDICATOR}}/(main|viins)/${SEGMENT_SEPARATOR}}"
=======
print -n "%{%k%F{${CURRENT_BG}}%}${${KEYMAP/vicmd/$NORM_INDICATOR}/(main|viins)/$SEGMENT_SEPARATOR}"
>>>>>>> parent of 55ea696... RPROMPT Method
print -n "%{%k%F{${CURRENT_BG}}%}${SEGMENT_SEPARATOR}"
else
print -n "%{%k%}"
fi
@ -144,18 +139,9 @@ prompt_eriner_main() {
prompt_end
}
prompt_eriner_precmd() {
vcs_info
}
function zle-keymap-select zle-line-init {
PROMPT="%{%f%b%k%}$(prompt_eriner_main)"
<<<<<<< HEAD
RPROMPT=
=======
# local INSM="$TEMP"
#local NORM="$TEMP%{%F{red}%}"
>>>>>>> parent of 55ea696... RPROMPT Method
RPROMPT="${${KEYMAP/vicmd/--NORMAL--}/(main|viins)/}"
zle reset-prompt
}
@ -165,7 +151,6 @@ prompt_eriner_setup() {
prompt_opts=(cr subst percent)
# add-zsh-hook precmd prompt_eriner_precmd
zle -N zle-keymap-select
zle -N zle-line-init

View file

@ -14,8 +14,10 @@ gst_get_pwd() {
print ${prompt_short_dir}
}
prompt_gitster_precmd() {
function zle-line-init zle-keymap-select 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() {
@ -26,7 +28,9 @@ 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)
}

View file

@ -46,6 +46,12 @@ prompt_magicmace_precmd() {
fi
}
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)/}"
zle reset-prompt
}
prompt_magicmace_setup() {
autoload -Uz colors && colors
autoload -Uz add-zsh-hook
@ -62,9 +68,8 @@ prompt_magicmace_setup() {
zstyle ':zim:git-info:keys' format \
'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=''
zle -N zle-line-init
zle -N zle-keymap-select
}
prompt_magicmace_setup "$@"