Merge pull request #1867 from telser/master
Simple Cabal plugin
Diff
1diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh
2new file mode 100644
3index 0000000000000000000000000000000000000000..8d3c64587155a75a48055fa28d649159d328a874
4--- /dev/null
5+++ b/plugins/cabal/cabal.plugin.zsh
6@@ -0,0 +1,36 @@
7+function _cabal_commands() {
8+ local ret=1 state
9+ _arguments ':subcommand:->subcommand' && ret=0
10+
11+ case $state in
12+ subcommand)
13+ subcommands=(
14+ "bench:Run the benchmark, if any (configure with UserHooks)"
15+ "build:Make this package ready for installation"
16+ "check:Check the package for common mistakes"
17+ "clean:Clean up after a build"
18+ "copy:Copy teh files into the install locations"
19+ "configure:Prepare to build the package"
20+ "fetch:Downloads packages for later installation"
21+ "haddock:Generate HAddock HTML documentation"
22+ "help:Help about commands"
23+ "hscolour:Generate HsColour colourised code, in HTML format"
24+ "info:Display detailed information about a particular package"
25+ "init:Interactively create a .cabal file"
26+ "install:Installs a list of packages"
27+ "list:List packages matching a search string"
28+ "register:Register this package with the compiler"
29+ "report:Upload build reports to a remote server"
30+ "sdist:Generate a source distribution file (.tar.gz)"
31+ "test:Run the test suite, if any (configure with UserHooks)"
32+ "unpack:Unpacks packages for user inspection"
33+ "update:Updates list of known packages"
34+ "upload:Uploads source packages to Hackage"
35+ )
36+ _describe -t subcommands 'cabal subcommands' subcommands && ret=0
37+ esac
38+
39+ return ret
40+}
41+
42+compdef _cabal_commands cabal