aboutsummaryrefslogtreecommitdiff
path: root/.config/fish/functions/_nvm_version_deactivate.fish
diff options
context:
space:
mode:
Diffstat (limited to '.config/fish/functions/_nvm_version_deactivate.fish')
-rw-r--r--.config/fish/functions/_nvm_version_deactivate.fish5
1 files changed, 5 insertions, 0 deletions
diff --git a/.config/fish/functions/_nvm_version_deactivate.fish b/.config/fish/functions/_nvm_version_deactivate.fish
new file mode 100644
index 0000000..24dd36e
--- /dev/null
+++ b/.config/fish/functions/_nvm_version_deactivate.fish
@@ -0,0 +1,5 @@
+function _nvm_version_deactivate --argument-names ver
+ test "$nvm_current_version" = "$ver" && set --erase nvm_current_version
+ set --local index (contains --index -- $nvm_data/$ver/bin $PATH) &&
+ set --erase PATH[$index]
+end