aboutsummaryrefslogtreecommitdiff
path: root/.config/fish/functions/_nvm_version_deactivate.fish
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2023-11-15 08:58:19 +0800
committerGuangxiong Lin <[email protected]>2023-11-15 08:58:19 +0800
commit016c96d8af4c944fb2b9fc0c673f5130472a7977 (patch)
treeb8410f3cea2780043d66a67a8b1e173930488bed /.config/fish/functions/_nvm_version_deactivate.fish
parent55c2d8e73db4e9e93cddcb981c15fb8fe9b1dcf4 (diff)
downloaddotfiles-016c96d8af4c944fb2b9fc0c673f5130472a7977.tar.gz
dotfiles-016c96d8af4c944fb2b9fc0c673f5130472a7977.tar.bz2
dotfiles-016c96d8af4c944fb2b9fc0c673f5130472a7977.zip
Update aliases and add fisher
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