e3c02bfeba64b655ca506d0d46eca724f2889a87

Author
Paul Melnikow <paul.melnikow@bodylabs.com>
Committer
Paul Melnikow <paul.melnikow@bodylabs.com>
Date

Message

Plugin for Node Version Manager

Diff

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