Fix issue with delete-key in st

In 'simple terminal' the delete key prints \e[P by default, which is
related to the different approach the authors of st are taking on the
matter of shell configuration. The main problem is the malfunction of
the delete key, so we have to use a workaround like this.
This commit is contained in:
LetMeByte 2021-10-14 13:50:12 +00:00 committed by David Adam
parent 8dc3982408
commit 6606dfbeb5

View File

@ -111,6 +111,11 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
# term-specific special bindings
switch "$TERM"
case 'st-256color'
# suckless and bash/zsh/fish have a different approach to how the terminal
# should be configured but the major effect is that delete doesn't work.
# just work around that for now
bind --preset $argv \e\[P delete-char
case 'rxvt*'
bind --preset $argv \e\[8~ end-of-line
bind --preset $argv \eOc forward-word