mirror of
https://github.com/junegunn/fzf
synced 2026-06-09 10:03:17 +00:00
nushell: [install] Query nu for autoload directory
Nushell uses platform-native config dirs (Application Support on macOS, AppData on Windows), so $XDG_CONFIG_HOME/nushell/autoload is wrong outside Linux and the generated file is silently ignored. Ask `nu` for `$nu.user-autoload-dirs` instead. Safe because the earlier shells loop already drops `nushell` from $shells when `nu` is not on PATH.
This commit is contained in:
@@ -10,7 +10,6 @@ shells="bash zsh fish nushell"
|
||||
prefix='~/.fzf'
|
||||
prefix_expand=~/.fzf
|
||||
fish_dir=${XDG_CONFIG_HOME:-$HOME/.config}/fish
|
||||
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
||||
|
||||
help() {
|
||||
cat << EOF
|
||||
@@ -446,6 +445,7 @@ fi
|
||||
if [[ "$shells" =~ nushell ]]; then
|
||||
if [[ $key_bindings -eq 1 || $auto_completion -eq 1 ]]; then
|
||||
echo "Setting up Nushell integration ..."
|
||||
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
|
||||
mkdir -p "$nushell_autoload_dir"
|
||||
dest="$nushell_autoload_dir/_fzf_integration.nu"
|
||||
echo -n " Generate $dest ... "
|
||||
|
||||
Reference in New Issue
Block a user