Browse code

Merged pull request #270 from sankara/d03a6176aacd583993c02c7e837d10751c431875.

Basic autocompletion for Leiningen (fixed pull request)

Robby Russell authored on 29/04/2011 at 10:36:09
Showing 1 changed files
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