mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-02-02 03:58:30 +00:00
[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.
This commit is contained in:
parent
f466e94d65
commit
cf2bb5e40e
@ -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 (__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_OPTS_FILE ''
|
||||||
set -lx FZF_DEFAULT_COMMAND
|
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
|
if type -q perl
|
||||||
set -a FZF_DEFAULT_OPTS '--tac'
|
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\''
|
set FZF_DEFAULT_COMMAND 'builtin history -z --reverse | command perl -0 -pe \'s/^/$.\t/g; s/\n/\n\t/gm\''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user