Basic autocompletion for Leiningen (fixed pull request)
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,27 @@ |
| 0 |
+function _lein_commands() {
|
|
| 1 |
+ local ret=1 state |
|
| 2 |
+ _arguments ':subcommand:->subcommand' && ret=0 |
|
| 3 |
+ |
|
| 4 |
+ case $state in |
|
| 5 |
+ subcommand) |
|
| 6 |
+ subcommands=( |
|
| 7 |
+ "clean:remove compiled files and dependencies from project" |
|
| 8 |
+ "compile:ahead-of-time compile the project" |
|
| 9 |
+ "deps:download and install all dependencies" |
|
| 10 |
+ "help:display a list of tasks or help for a given task" |
|
| 11 |
+ "install:install the project and its dependencies in your local repository" |
|
| 12 |
+ "jar:create a jar file containing the compiled .class files" |
|
| 13 |
+ "new:create a new project skeleton" |
|
| 14 |
+ "pom:write a pom.xml file to disk for maven interop" |
|
| 15 |
+ "test:run the project's tests" |
|
| 16 |
+ "uberjar:Create a jar including the contents of each of deps" |
|
| 17 |
+ "upgrade:upgrade leiningen to the latest stable release" |
|
| 18 |
+ "version:print leiningen's version" |
|
| 19 |
+ ) |
|
| 20 |
+ _describe -t subcommands 'leiningen subcommands' subcommands && ret=0 |
|
| 21 |
+ esac |
|
| 22 |
+ |
|
| 23 |
+ return ret |
|
| 24 |
+} |
|
| 25 |
+ |
|
| 26 |
+compdef _lein_commands lein |