_sbt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #compdef sbt
  2. #autoload
  3. local -a _sbt_commands
  4. _sbt_commands=(
  5. 'clean:delete files produced by the build'
  6. 'compile:compile sources'
  7. 'console:start the Scala REPL with project classes on the classpath'
  8. 'console-quick:start the Scala REPL with project deps on the classpath'
  9. 'console-project:start the Scala REPL w/sbt+build-def on the classpath'
  10. 'dist:generate distribution artifacts'
  11. 'dist\:clean:clean distribution artifacts'
  12. 'doc:generate API documentation'
  13. 'gen-idea:generate Intellij Idea project files'
  14. 'package:produce the main artifact, such as a binary jar'
  15. 'package-doc:produce a doc artifact, such as a jar containing API docs'
  16. 'package-src:produce a source artifact, such as a jar containing sources'
  17. 'publish:publish artifacts to a repository'
  18. 'publish-local:publish artifacts to the local repository'
  19. 'publish-m2:publish artifacts to the local Maven 2 repository'
  20. 'run:run a main class'
  21. 'run-main:run the main class selected by the first argument'
  22. 'test:execute all tests'
  23. 'test-only:execute the tests provided as arguments'
  24. 'test-quick:execute previously failed tests'
  25. 'update:resolve and optionally retrieve dependencies'
  26. )
  27. local expl
  28. _arguments \
  29. '(-help)-h[prints an help message]' \
  30. '(-h)-help[prints an help message]' \
  31. '(-verbose)-v[this runner is chattier]' \
  32. '(-v)-verbose[this runner is chattier]' \
  33. '(-debug)-d[set sbt log level to debug]' \
  34. '(-d)-debug[set sbt log level to debug]' \
  35. '-no-colors[disable ANSI color codes]' \
  36. '-sbt-create[start even if current dir contains no sbt project]' \
  37. '-sbt-dir[path to global settings/plugins dir (default: ~/.sbt)]' \
  38. '-sbt-boot[path to shared boot dir (default: ~/.sbt/boot)]' \
  39. '-ivy[path to local Ivy repository (default: ~/.ivy2)]' \
  40. '-mem[set memory options]' \
  41. '-no-share[use all local caches; no sharing]' \
  42. '-no-global[use global caches, but do not use global ~/.sbt dir]' \
  43. '-jvm-debug[turn on JVM debugging, open at the given port]' \
  44. '-batch[disable interactive mode]' \
  45. '-sbt-version[use the specified version of sbt]' \
  46. '-sbt-jar[use the specified jar as the sbt launcher]' \
  47. '(-sbt-snapshot)-sbt-rc[use an RC version of sbt]' \
  48. '(-sbt-rc)-sbt-snapshot[use a snapshot version of sbt]' \
  49. '-java-home[alternate JAVA_HOME]' \
  50. '*:: :->subcmds' && return 0
  51. _describe -t commands "sbt subcommand" _sbt_commands
  52. return