From d03a6176aacd583993c02c7e837d10751c431875 Mon Sep 17 00:00:00 2001 From: Sankara Rameswaran Date: Wed, 2 Mar 2011 15:20:43 +0530 Subject: [PATCH] Lein completion --- plugins/lein/lein.plugin.zsh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 plugins/lein/lein.plugin.zsh diff --git a/plugins/lein/lein.plugin.zsh b/plugins/lein/lein.plugin.zsh new file mode 100644 index 00000000..19af3556 --- /dev/null +++ b/plugins/lein/lein.plugin.zsh @@ -0,0 +1,27 @@ +function _lein_commands() { + local ret=1 state + _arguments ':subcommand:->subcommand' && ret=0 + + case $state in + subcommand) + subcommands=( + "clean:remove compiled files and dependencies from project" + "compile:ahead-of-time compile the project" + "deps:download and install all dependencies" + "help:display a list of tasks or help for a given task" + "install:install the project and its dependencies in your local repository" + "jar:create a jar file containing the compiled .class files" + "new:create a new project skeleton" + "pom:write a pom.xml file to disk for maven interop" + "test:run the project's tests" + "uberjar:Create a jar including the contents of each of deps" + "upgrade:upgrade leiningen to the latest stable release" + "version:print leiningen's version" + ) + _describe -t subcommands 'leiningen subcommands' subcommands && ret=0 + esac + + return ret +} + +compdef _lein_commands lein