my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

3 years ago
  1. #compdef nvm
  2. #autoload
  3. [[ -f "$NVM_DIR/nvm.sh" ]] || return 0
  4. local -a _1st_arguments
  5. _1st_arguments=(
  6. 'help:show help'
  7. '--version:print out the latest released version of nvm'
  8. 'install:download and install a version in <node|iojs|node version number>'
  9. 'install-latest-npm:download and install the latest npm version'
  10. 'uninstall:uninstall a version'
  11. 'use:modify PATH to use <version>. Uses .nvmrc if available'
  12. 'exec:run <command> on <version>. Uses .nvmrc if available'
  13. 'run:run `node` on <version> with <args> as arguments. Uses .nvmrc if available'
  14. 'current:list installed versions'
  15. 'ls:list installed versions or versions matching a given description'
  16. 'version:resolve the given description to a single local version'
  17. 'version-remote:resolve the given description to a single remote version'
  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. 'reinstall-packages:reinstall global `npm` packages contained in <version> to current version'
  23. 'unload:unload `nvm` from shell'
  24. 'which:display path to installed node version. Uses .nvmrc if available'
  25. )
  26. _arguments -C '*:: :->subcmds' && return 0
  27. if (( CURRENT == 1 )); then
  28. _describe -t commands "nvm subcommand" _1st_arguments
  29. return
  30. fi