summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorbitraid <bitraid@protonmail.ch>2025-04-25 23:04:39 +0300
committerJunegunn Choi <junegunn.c@gmail.com>2025-04-28 00:27:51 +0900
commit9c1a47acf7453f9dad5905b7f23ad06e5195d51f (patch)
tree25b6847ec073cc21faeda76a2209761f87cb4fa1 /shell
parent0c280a3ce195a43dd0603739aed5b256b49a61b4 (diff)
downloadfzf-9c1a47acf7453f9dad5905b7f23ad06e5195d51f.tar.gz
[fish] Support deleting history items with SHIFT-DEL
Bind to SHIFT-DELETE a command that deletes the selected history items. It can be overridden by $FZF_CTRL_R_OPTS.
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.fish1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index b9d827d2..c8ecdd9e 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -158,6 +158,7 @@ function fzf_key_bindings
set -lx FZF_DEFAULT_OPTS (__fzf_defaults '' \
'--nth=2..,.. --scheme=history --multi --wrap-sign="\t↳ "' \
+ '--bind=\'shift-delete:execute-silent(eval history delete --exact --case-sensitive -- (string escape -n -- {+} | string replace -r -a "^\d*\\\\\\t|(?<=\\\\\\n)\\\\\\t" ""))+reload(eval $FZF_DEFAULT_COMMAND)\'' \
"--bind=ctrl-r:toggle-sort --highlight-line $FZF_CTRL_R_OPTS" \
'--accept-nth=2.. --read0 --print0 --with-shell='(status fish-path)\\ -c)