home: zsh: use terminfo for mappings
This commit is contained in:
parent
ca047bfe97
commit
bc5fa3f679
|
@ -1,5 +1,13 @@
|
|||
# shellcheck disable=2154
|
||||
|
||||
# The expression: (( ${+terminfo} )) should never fail, but does if we
|
||||
# don't have a tty, perhaps due to a bug in the zsh/terminfo module.
|
||||
if [[ "$TERM" != emacs ]] && (( ${+terminfo} )) 2>/dev/null; then
|
||||
# Fix delete key not working
|
||||
bindkey "\e[3~" delete-char
|
||||
((${+terminfo[kdch1]})) && bindkey -- "${terminfo[kdch1]}" delete-char
|
||||
# Enable Shift-Tab to go backwards in completion list
|
||||
((${+terminfo[kcbt]})) && bindkey -- "${terminfo[kcbt]}" reverse-menu-complete
|
||||
fi
|
||||
|
||||
# Fix Ctrl+u killing from the cursor instead of the whole line
|
||||
bindkey '^u' backward-kill-line
|
||||
|
|
Loading…
Reference in a new issue