zsh: Add $fzf_default_no_rg
Move the fallback for $FZF_DEFAULT_COMMAND into the variable fzf_default_no_rg that is always set. This way FZF_ALT_C_COMMAND can reuse it instead of spawning a new shell and messing with PATH.
This commit is contained in:
@@ -140,8 +140,5 @@ bindkey -M vicmd '^K' fzf-history-widget
|
||||
FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
||||
# Use the fallback default command when ripgrep is not installed but with
|
||||
# directories instead of files.
|
||||
FZF_ALT_C_COMMAND="$(
|
||||
zsh -c 'path= . "$ZDOTDIR/.zprofile"; echo "$FZF_DEFAULT_COMMAND"' \
|
||||
| sed 's/-type f/-type d/'
|
||||
)"
|
||||
FZF_ALT_C_COMMAND="${fzf_default_no_rg/-type f/-type d}"
|
||||
comp-source "$ZDOTDIR/plugins/fzf/shell/key-bindings.zsh"
|
||||
|
||||
Reference in New Issue
Block a user