nushell: [uninstall] Query nu for autoload directory
Mirror the install fix. Fall back to the XDG path when `nu` is no longer on PATH (e.g. nushell already uninstalled).
This commit is contained in:
parent
94f6daa61c
commit
1b6e17ca39
1 changed files with 5 additions and 1 deletions
|
|
@ -114,7 +114,11 @@ if [ -d "${fish_dir}/functions" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
||||
if command -v nu > /dev/null; then
|
||||
nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')
|
||||
else
|
||||
nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload
|
||||
fi
|
||||
remove "${nushell_autoload_dir}/_fzf_integration.nu"
|
||||
|
||||
config_dir=$(dirname "$prefix_expand")
|
||||
|
|
|
|||
Loading…
Reference in a new issue