fix: cursor shape in zsh
This commit is contained in:
parent
4cde32d45e
commit
4d88409e2f
@ -51,17 +51,16 @@ function zle-keymap-select {
|
|||||||
[[ ${KEYMAP} == viins ]] ||
|
[[ ${KEYMAP} == viins ]] ||
|
||||||
[[ ${KEYMAP} = '' ]] ||
|
[[ ${KEYMAP} = '' ]] ||
|
||||||
[[ $1 = 'beam' ]]; then
|
[[ $1 = 'beam' ]]; then
|
||||||
echo -ne '\e[5 q'
|
echo -ne '\e[6 q'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
zle -N zle-keymap-select
|
zle -N zle-keymap-select
|
||||||
zle-line-init() {
|
zle-line-init() {
|
||||||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||||
echo -ne "\e[5 q"
|
echo -ne "\e[6 q"
|
||||||
}
|
}
|
||||||
zle -N zle-line-init
|
zle -N zle-line-init
|
||||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
precmd_dunctions() { zle-line-init ;} # Use beam shape cursor for each new prompt.
|
||||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
|
||||||
|
|
||||||
# Load aliases and shortcuts if existent.
|
# Load aliases and shortcuts if existent.
|
||||||
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
||||||
|
Reference in New Issue
Block a user