_ros 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #compdef ros
  2. #autoload
  3. # roswell zsh completion, based on gem completion
  4. local -a _1st_arguments
  5. _1st_arguments=(
  6. 'run: Run repl'
  7. 'install:Install a given implementation or a system for roswell environment'
  8. 'update:Update installed systems.'
  9. 'build:Make executable from script.'
  10. 'use:Change default implementation.'
  11. 'init:a new ros script, optionally based on a template.'
  12. 'fmt:Indent lisp source.'
  13. 'list:Information'
  14. 'template:[WIP] Manage templates'
  15. 'delete:Delete installed implementations'
  16. 'config:Get and set options'
  17. 'version:Show the roswell version information'
  18. "help:Use \"ros help [command]\" for more information about a command."$'\n\t\t'"Use \"ros help [topic]\" for more information about the topic."
  19. )
  20. #local expl
  21. _arguments \
  22. '(--version)'--version'[Print version information and quit]' \
  23. '(-w --wrap)'{-w,--wrap}'[\[CODE\] Run roswell with a shell wrapper CODE]' \
  24. '(-m --image)'{-m,--image}'[\[IMAGE\] continue from Lisp image IMAGE]' \
  25. '(-M --module)'{-M,--module}'[\[NAME\] Execute ros script found in ROSWELLPATH. (pythons -m)]' \
  26. '(-L --lisp)'{-L,--lisp}'[\[NAME\] Run roswell with a lisp impl NAME\[/VERSION\].]' \
  27. '(-l --load)'{-l,--load}'[\[FILE\] load lisp FILE while building]' \
  28. '(-S --source-registry)'{-S,--source-registry}'[\[X\] override source registry of asdf systems]' \
  29. '(-s --system --load-system)'{-s,--system,--load-system}'[\[SYSTEM\] load asdf SYSTEM while building]' \
  30. '(-p --package)'{-p,--package}'[\[PACKAGE\] change current package to \[PACKAGE\]]' \
  31. '(-sp --system-package)'{-sp,--system-package}'[\[SP\] combination of -s \[SP\] and -p \[SP\]]' \
  32. '(-e --eval)'{-e,--eval}'[\[FORM\] evaluate \[FORM\] while building]' \
  33. '--require'--require'[\[MODULE\] require \[MODULE\] while building]' \
  34. '(-q --quit)'{-q,--quit}'[quit lisp here]' \
  35. '(-r --restart)'{-r,--restart}'[\[FUNC\] restart from build by calling (\[FUNC\])]' \
  36. '(-E --entry)'{-E,--entry}'[\[FUNC\] restart from build by calling (\[FUNC\] argv)]' \
  37. '(-i --init)'{-i,--init}'[\[FORM\] evaluate \[FORM\] after restart]' \
  38. '(-ip --print)'{-ip,--print}'[\[FORM\] evaluate and princ \[FORM\] after restart]' \
  39. '(-iw --write)'{-iw,--write}'[\[FORM\] evaluate and write \[FORM\] after restart]' \
  40. '(-F --final)'{-F,--final}'[\[FORM\] evaluate \[FORM\] before dumping IMAGE]' \
  41. '(\+R --no-rc)'{\+R,--no-rc}'[skip /etc/rosrc, ~/.roswell/init.lisp]' \
  42. '(-A --asdf)'{-A,--asdf}'[use new asdf]' \
  43. '(\+Q --no-quicklisp)'{\+Q,--no-quicklisp}'[do not use quicklisp]' \
  44. '(-v --verbose)'{-v,--verbose}'[be quite noisy while building]' \
  45. '--quiet'--quiet'[be quite quiet while building default]' \
  46. '--test'--test'[for test purpose]' \
  47. '*:: :->subcmds' && return 0
  48. if (( CURRENT == 1 )); then
  49. _describe -t commands "ros subcommand" _1st_arguments
  50. return
  51. fi
  52. # _files
  53. case "$words[1]" in
  54. -l|--load)
  55. _files
  56. ;;
  57. esac