diff options
Diffstat (limited to 'plugins/sbt')
-rw-r--r-- | plugins/sbt/README.md | 32 | ||||
-rw-r--r-- | plugins/sbt/_sbt | 19 | ||||
-rw-r--r-- | plugins/sbt/sbt.plugin.zsh | 14 |
3 files changed, 50 insertions, 15 deletions
diff --git a/plugins/sbt/README.md b/plugins/sbt/README.md new file mode 100644 index 000000000..f0201938e --- /dev/null +++ b/plugins/sbt/README.md @@ -0,0 +1,32 @@ +# sbt plugin + +This plugin adds completion for the [sbt, the interactive build tool](https://scala-sbt.org/), +as well as some aliases for common sbt commands. + +To use it, add `sbt` to the plugins array in your zshrc file: + +```zsh +plugins=(... sbt) +``` + +## Aliases + +| Alias | Command | Description | +|-------|-----------------------|--------------------------------------------------------------| +| sbc | `sbt compile` | Compiles the main sources | +| sbcln | `sbt clean` | Deletes all generated files | +| sbcc | `sbt clean compile` | Deletes generated files, compiles the main sources | +| sbco | `sbt console` | Starts Scala with the compiled sources and all dependencies | +| sbcq | `sbt consoleQuick` | Starts Scala with all dependencies | +| sbcp | `sbt consoleProject` | Starts Scala with sbt and the build definitions | +| sbd | `sbt doc` | Generates API documentation for Scala source files | +| sbdc | `sbt dist:clean` | Deletes the distribution packages | +| sbdi | `sbt dist` | Creates the distribution packages | +| sbgi | `sbt genIdea` | Create Idea project files | +| sbp | `sbt publish` | Publishes artifacts to the repository | +| sbpl | `sbt publishLocal` | Publishes artifacts to the local Ivy repository | +| sbr | `sbt run` | Runs the main class for the project | +| sbrm | `sbt runMain` | Runs the specified main class for the project | +| sbu | `sbt update` | Resolves and retrieves external dependencies | +| sbx | `sbt test` | Compiles and runs all tests | +| sba | `sbt assembly` | Create a fat JAR with all dependencies | diff --git a/plugins/sbt/_sbt b/plugins/sbt/_sbt index 91372aa72..2138a722f 100644 --- a/plugins/sbt/_sbt +++ b/plugins/sbt/_sbt @@ -6,22 +6,23 @@ _sbt_commands=( 'clean:delete files produced by the build' 'compile:compile sources' 'console:start the Scala REPL with project classes on the classpath' - 'console-quick:start the Scala REPL with project deps on the classpath' - 'console-project:start the Scala REPL w/sbt+build-def on the classpath' + 'consoleQuick:start the Scala REPL with project deps on the classpath' + 'consoleProject:start the Scala REPL w/sbt+build-def on the classpath' 'dist:generate distribution artifacts' 'dist\:clean:clean distribution artifacts' 'doc:generate API documentation' - 'gen-idea:generate Intellij Idea project files' + 'genIdea:generate Intellij Idea project files' 'package:produce the main artifact, such as a binary jar' - 'package-doc:produce a doc artifact, such as a jar containing API docs' - 'package-src:produce a source artifact, such as a jar containing sources' + 'packageDoc:produce a doc artifact, such as a jar containing API docs' + 'packageSrc:produce a source artifact, such as a jar containing sources' 'publish:publish artifacts to a repository' - 'publish-local:publish artifacts to the local repository' + 'publishLocal:publish artifacts to the local repository' + 'publishM2:publish artifacts to the local Maven 2 repository' 'run:run a main class' - 'run-main:run the main class selected by the first argument' + 'runMain:run the main class selected by the first argument' 'test:execute all tests' - 'test-only:execute the tests provided as arguments' - 'test-quick:execute previously failed tests' + 'testOnly:execute the tests provided as arguments' + 'testQuick:execute previously failed tests' 'update:resolve and optionally retrieve dependencies' ) diff --git a/plugins/sbt/sbt.plugin.zsh b/plugins/sbt/sbt.plugin.zsh index 203c691f5..851302c68 100644 --- a/plugins/sbt/sbt.plugin.zsh +++ b/plugins/sbt/sbt.plugin.zsh @@ -7,17 +7,19 @@ # aliases - mnemonic: prefix is 'sb' alias sbc='sbt compile' +alias sbcc='sbt clean compile' alias sbco='sbt console' -alias sbcq='sbt console-quick' -alias sbcl='sbt clean' -alias sbcp='sbt console-project' +alias sbcq='sbt consoleQuick' +alias sbcln='sbt clean' +alias sbcp='sbt consoleProject' alias sbd='sbt doc' alias sbdc='sbt dist:clean' alias sbdi='sbt dist' -alias sbgi='sbt gen-idea' +alias sbgi='sbt genIdea' alias sbp='sbt publish' -alias sbpl='sbt publish-local' +alias sbpl='sbt publishLocal' alias sbr='sbt run' -alias sbrm='sbt run-main' +alias sbrm='sbt runMain' alias sbu='sbt update' alias sbx='sbt test' +alias sba='sbt assembly' |