Skip to content
Myr

nushell: [uninstall] Query nu for autoload directory

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Mirror the install fix. Fall back to the XDG path when `nu` is no longer on PATH (e.g. nushell already uninstalled).

authored by Junegunn Choi · committed by Junegunn Choi · parent 94f6daa · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:uninstall+5 added-1 removed
112 unmodified lines
113 echo "Can't delete non-empty directory: \"${fish_dir}/functions\""114 fi115fi116117if command -v nu > /dev/null; then118 nushell_autoload_dir=$(nu -c '$nu.user-autoload-dirs | first')119else117nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload120 nushell_autoload_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nushell/autoload121fi122remove "${nushell_autoload_dir}/_fzf_integration.nu"123124config_dir=$(dirname "$prefix_expand")125if [[ $xdg == 1 ]] && [[ $config_dir == */fzf ]] && [[ -d $config_dir ]]; then
2 unmodified lines