summaryrefslogtreecommitdiff
path: root/plugins/cabal/cabal.plugin.zsh
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2013-06-25 09:23:36 -0700
committerRobby Russell <robby@planetargon.com>2013-06-25 09:23:36 -0700
commite727068cee2d4af6d33f80d8a8da173a410feb00 (patch)
tree49d9a968eec37cca0ca45f03488841c111302b93 /plugins/cabal/cabal.plugin.zsh
parent6e3e07fd90c40d9b0af8f1ef7eea7b54928a17eb (diff)
parent82666e25e31451527520ab49a819e4135ed8a34c (diff)
downloadzsh-e727068cee2d4af6d33f80d8a8da173a410feb00.tar.gz
zsh-e727068cee2d4af6d33f80d8a8da173a410feb00.tar.bz2
zsh-e727068cee2d4af6d33f80d8a8da173a410feb00.zip
Merge pull request #1867 from telser/master
Simple Cabal plugin
Diffstat (limited to 'plugins/cabal/cabal.plugin.zsh')
-rw-r--r--plugins/cabal/cabal.plugin.zsh36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh
new file mode 100644
index 000000000..8d3c64587
--- /dev/null
+++ b/plugins/cabal/cabal.plugin.zsh
@@ -0,0 +1,36 @@
+function _cabal_commands() {
+ local ret=1 state
+ _arguments ':subcommand:->subcommand' && ret=0
+
+ case $state in
+ subcommand)
+ subcommands=(
+ "bench:Run the benchmark, if any (configure with UserHooks)"
+ "build:Make this package ready for installation"
+ "check:Check the package for common mistakes"
+ "clean:Clean up after a build"
+ "copy:Copy teh files into the install locations"
+ "configure:Prepare to build the package"
+ "fetch:Downloads packages for later installation"
+ "haddock:Generate HAddock HTML documentation"
+ "help:Help about commands"
+ "hscolour:Generate HsColour colourised code, in HTML format"
+ "info:Display detailed information about a particular package"
+ "init:Interactively create a .cabal file"
+ "install:Installs a list of packages"
+ "list:List packages matching a search string"
+ "register:Register this package with the compiler"
+ "report:Upload build reports to a remote server"
+ "sdist:Generate a source distribution file (.tar.gz)"
+ "test:Run the test suite, if any (configure with UserHooks)"
+ "unpack:Unpacks packages for user inspection"
+ "update:Updates list of known packages"
+ "upload:Uploads source packages to Hackage"
+ )
+ _describe -t subcommands 'cabal subcommands' subcommands && ret=0
+ esac
+
+ return ret
+}
+
+compdef _cabal_commands cabal