From 32a7824182731081c7cbeba363be7b6f56aeb2a5 Mon Sep 17 00:00:00 2001 From: Alexei Danchenkov Date: Fri, 21 Mar 2014 09:24:59 -0700 Subject: [PATCH] Added a forward-delete fallback to bind Delete key Delete key (of Fn+Delete on Mac) would print "~" instead of deletion. --- lib/key-bindings.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 28af4494..5f3f237c 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -53,6 +53,10 @@ fi bindkey '^?' backward-delete-char # [Backspace] - delete backward if [[ "${terminfo[kdch1]}" != "" ]]; then bindkey "${terminfo[kdch1]}" delete-char # [Delete] - delete forward +else + bindkey "^[[3~" delete-char + bindkey "^[3;5~" delete-char + bindkey "\e[3~" delete-char fi # Edit the current command line in $EDITOR