From 6606dfbeb5e65e1f9d1b900248e02dea6690d48c Mon Sep 17 00:00:00 2001 From: LetMeByte <90835558+LetMeByte@users.noreply.github.com> Date: Thu, 14 Oct 2021 13:50:12 +0000 Subject: [PATCH] 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. --- share/functions/fish_default_key_bindings.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish index ff7b333eb..1416d2d6f 100644 --- a/share/functions/fish_default_key_bindings.fish +++ b/share/functions/fish_default_key_bindings.fish @@ -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