diff options
author | Robby Russell <robby@planetargon.com> | 2013-09-19 06:52:42 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-09-19 06:52:42 -0700 |
commit | 9d936087406339129c8c9add9fa9091343eb1c2b (patch) | |
tree | 301aee999f9d0beff9261c59579bc786bfb32ce0 | |
parent | ea4d3367b95e03caf549faf34ee37a7da1dfdafd (diff) | |
parent | 3007f96090e0f5a9e6430575afc7dfa92b235bc9 (diff) | |
download | zsh-9d936087406339129c8c9add9fa9091343eb1c2b.tar.gz zsh-9d936087406339129c8c9add9fa9091343eb1c2b.tar.bz2 zsh-9d936087406339129c8c9add9fa9091343eb1c2b.zip |
Merge pull request #2077 from paulmelnikow/nvm
Plugin for Node Version Manager
-rw-r--r-- | plugins/nvm/_nvm | 26 | ||||
-rw-r--r-- | plugins/nvm/nvm.plugin.zsh | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/plugins/nvm/_nvm b/plugins/nvm/_nvm new file mode 100644 index 000000000..a95c9e375 --- /dev/null +++ b/plugins/nvm/_nvm @@ -0,0 +1,26 @@ +#compdef nvm +#autoload + +[[ -s ~/.nvm/nvm.sh ]] || return 0 + +local -a _1st_arguments +_1st_arguments=( + 'help:show help' + 'install:download and install a version' + 'uninstall:uninstall a version' + 'use:modify PATH to use version' + 'run:run version with given arguments' + 'ls:list installed versions or versions matching a given description' + 'ls-remote:list remote versions available for install' + 'deactivate:undo effects of NVM on current shell' + 'alias:show or set aliases' + 'unalias:deletes an alias' + 'copy-packages:install global NPM packages to current version' +) + +_arguments -C '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "nvm subcommand" _1st_arguments + return +fi
\ No newline at end of file diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh new file mode 100644 index 000000000..9709719fe --- /dev/null +++ b/plugins/nvm/nvm.plugin.zsh @@ -0,0 +1,3 @@ +# The addition 'nvm install' attempts in ~/.profile + +[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh |