9d936087406339129c8c9add9fa9091343eb1c2b

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #2077 from paulmelnikow/nvm

Plugin for Node Version Manager

Diff

 1diff --git a/plugins/nvm/_nvm b/plugins/nvm/_nvm
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..a95c9e3753e5eb398f0ec271069d86db6a34cf81
 4--- /dev/null
 5+++ b/plugins/nvm/_nvm
 6@@ -0,0 +1,26 @@
 7+#compdef nvm
 8+#autoload
 9+
10+[[ -s ~/.nvm/nvm.sh ]] || return 0
11+
12+local -a _1st_arguments
13+_1st_arguments=(
14+  'help:show help'
15+  'install:download and install a version'
16+  'uninstall:uninstall a version'
17+  'use:modify PATH to use version'
18+  'run:run version with given arguments'
19+  'ls:list installed versions or versions matching a given description'
20+  'ls-remote:list remote versions available for install'
21+  'deactivate:undo effects of NVM on current shell'
22+  'alias:show or set aliases'
23+  'unalias:deletes an alias'
24+  'copy-packages:install global NPM packages to current version'
25+)
26+
27+_arguments -C '*:: :->subcmds' && return 0
28+
29+if (( CURRENT == 1 )); then
30+  _describe -t commands "nvm subcommand" _1st_arguments
31+  return
32+fi
33diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh
34new file mode 100644
35index 0000000000000000000000000000000000000000..9709719fefb42fea444c8dc62fe13a5ced58bf72
36--- /dev/null
37+++ b/plugins/nvm/nvm.plugin.zsh
38@@ -0,0 +1,3 @@
39+# The addition 'nvm install' attempts in ~/.profile
40+
41+[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh