summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorbitraid <bitraid@protonmail.ch>2025-02-18 19:11:40 +0200
committerJunegunn Choi <junegunn.c@gmail.com>2025-02-20 08:30:30 +0900
commit7e9566f66aef3da3e7237458a06bc93ca481cc7b (patch)
tree916cc5e67044baf38b35f7d5ed7e67c242a1965a /shell
parent3f7e8a475d65b25add9df8bbf0e9472c13af4982 (diff)
downloadfzf-7e9566f66aef3da3e7237458a06bc93ca481cc7b.tar.gz
[fish] Refactor bind commands
Use single check for each default command variable.
Diffstat (limited to 'shell')
-rw-r--r--shell/key-bindings.fish11
1 files changed, 4 insertions, 7 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index 14e634cd..24b23d29 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -116,18 +116,15 @@ function fzf_key_bindings
end
bind \cr fzf-history-widget
- if not set -q FZF_CTRL_T_COMMAND; or test -n "$FZF_CTRL_T_COMMAND"
- bind \ct fzf-file-widget
- end
- if not set -q FZF_ALT_C_COMMAND; or test -n "$FZF_ALT_C_COMMAND"
- bind \ec fzf-cd-widget
- end
-
bind -M insert \cr fzf-history-widget
+
if not set -q FZF_CTRL_T_COMMAND; or test -n "$FZF_CTRL_T_COMMAND"
+ bind \ct fzf-file-widget
bind -M insert \ct fzf-file-widget
end
+
if not set -q FZF_ALT_C_COMMAND; or test -n "$FZF_ALT_C_COMMAND"
+ bind \ec fzf-cd-widget
bind -M insert \ec fzf-cd-widget
end