diff options
author | Jan WarchoĊ <jan.warchol@gmail.com> | 2022-04-06 04:29:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 11:29:01 +0900 |
commit | 3312cf525d23b3e12ae3a7261220a0e952c43ead (patch) | |
tree | 9e26bddabf75af7fa96295ec9f587cf230fa7b78 | |
parent | 209366754892b04a01fd40de03cb9874a1e8fef7 (diff) |
[bash] Allow passing args to __fzf_select__ via fzf-file-widget (#2783)
This makes it easier to make customizations, for example instead of
bind -x '"\C-o\C-i": FZF_CTRL_T_COMMAND="fasd -Rl" FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --tiebreak=index " fzf-file-widget'
it's enough to just
bind -x '"\C-o\C-i": FZF_CTRL_T_COMMAND="fasd -Rl" fzf-file-widget --tiebreak=index'
-rw-r--r-- | shell/key-bindings.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/key-bindings.bash b/shell/key-bindings.bash index e10117e3..d213ae08 100644 --- a/shell/key-bindings.bash +++ b/shell/key-bindings.bash @@ -32,7 +32,7 @@ __fzfcmd() { } fzf-file-widget() { - local selected="$(__fzf_select__)" + local selected="$(__fzf_select__ "$@")" READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}" READLINE_POINT=$(( READLINE_POINT + ${#selected} )) } |