zprofile: Fix non-export of FZF_DEFAULT_NO_RG
I never really noticed but `$FZF_ALT_C_COMMAND` was never set as `$fzf_default_no_rg` would be empty. Because the variable was not exported, the X session would not have it in it's environment.
This commit is contained in:
@@ -96,19 +96,20 @@ export LESS
|
|||||||
export MANPAGER='nvim +"Man! | set scrolloff=999 | normal M"'
|
export MANPAGER='nvim +"Man! | set scrolloff=999 | normal M"'
|
||||||
|
|
||||||
# NOTE: This is used in keys.zsh for the ALT_C widget
|
# NOTE: This is used in keys.zsh for the ALT_C widget
|
||||||
fzf_default_no_rg="find -L . -mindepth 1 \("
|
FZF_DEFAULT_COMMAND_NO_RG="find -L . -mindepth 1 \("
|
||||||
fzf_default_no_rg+=" -name '.git' -o"
|
FZF_DEFAULT_COMMAND_NO_RG+=" -name '.git' -o"
|
||||||
fzf_default_no_rg+=" -name '__pycache__' -o"
|
FZF_DEFAULT_COMMAND_NO_RG+=" -name '__pycache__' -o"
|
||||||
fzf_default_no_rg+=" -name 'node_modules'"
|
FZF_DEFAULT_COMMAND_NO_RG+=" -name 'node_modules'"
|
||||||
fzf_default_no_rg+=" \) -prune -o -type f -print"
|
FZF_DEFAULT_COMMAND_NO_RG+=" \) -prune -o -type f -print"
|
||||||
fzf_default_no_rg+=" | cut -c3-"
|
FZF_DEFAULT_COMMAND_NO_RG+=" | cut -c3-"
|
||||||
|
export FZF_DEFAULT_COMMAND_NO_RG
|
||||||
|
|
||||||
if (( $+commands[rg] )); then
|
if (( $+commands[rg] )); then
|
||||||
# Prune `.git/` and everything ignored by gitignore(5)
|
# Prune `.git/` and everything ignored by gitignore(5)
|
||||||
FZF_DEFAULT_COMMAND="rg -L --hidden --files -g '!.git'"
|
FZF_DEFAULT_COMMAND="rg -L --hidden --files -g '!.git'"
|
||||||
else
|
else
|
||||||
# Fallback to hardcoding the most important paths to prune
|
# Fallback to hardcoding the most important paths to prune
|
||||||
FZF_DEFAULT_COMMAND="$fzf_default_no_rg"
|
FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND_NO_RG"
|
||||||
fi
|
fi
|
||||||
export FZF_DEFAULT_COMMAND
|
export FZF_DEFAULT_COMMAND
|
||||||
|
|
||||||
|
|||||||
@@ -232,5 +232,5 @@ bindkey -M vicmd '^K' fzf-history-widget
|
|||||||
FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND} 2>/dev/null"
|
FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND} 2>/dev/null"
|
||||||
# Use the fallback default command when ripgrep is not installed but with
|
# Use the fallback default command when ripgrep is not installed but with
|
||||||
# directories instead of files.
|
# directories instead of files.
|
||||||
FZF_ALT_C_COMMAND="${fzf_default_no_rg/-type f/-type d}"
|
FZF_ALT_C_COMMAND="${FZF_DEFAULT_COMMAND_NO_RG/-type f/-type d}"
|
||||||
comp-source "$ZDOTDIR/plugins/fzf/shell/key-bindings.zsh"
|
comp-source "$ZDOTDIR/plugins/fzf/shell/key-bindings.zsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user