diff options
| author | bitraid <bitraid@protonmail.ch> | 2025-01-28 14:34:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-28 21:34:21 +0900 |
| commit | cf2bb5e40ea68f3b41cc76a012266b134c59c5bf (patch) | |
| tree | a18af6eca3a88958f44493808854ce3798132058 /shell | |
| parent | f466e94d651e4ac4cd9c02c4477af38a3bebbd5f (diff) | |
| download | fzf-cf2bb5e40ea68f3b41cc76a012266b134c59c5bf.tar.gz | |
[fish] Improve fish binary path detection (#4208)
Instead of exporting a local `$SHELL` containing the location of fish in
`$PATH` when global `$SHELL` is not fish, always set `--with-shell` with
the actual binary path of fish that the function is running from.
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/key-bindings.fish | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index 18280a94..c66a2aa2 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -64,7 +64,8 @@ function fzf_key_bindings set -lx FZF_DEFAULT_OPTS (__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort --wrap-sign '"\t"↳ ' --highlight-line +m $FZF_CTRL_R_OPTS") set -lx FZF_DEFAULT_OPTS_FILE '' set -lx FZF_DEFAULT_COMMAND - string match -q -r -- '/fish$' $SHELL; or set -lx SHELL (type -p fish) + set -a -- FZF_DEFAULT_OPTS --with-shell=(status fish-path)\\ -c + if type -q perl set -a FZF_DEFAULT_OPTS '--tac' set FZF_DEFAULT_COMMAND 'builtin history -z --reverse | command perl -0 -pe \'s/^/$.\t/g; s/\n/\n\t/gm\'' |
