From d3acea3965ebe13d6ed9885984ba8f5cc8ab4936 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz Date: Sat, 14 Dec 2013 18:57:46 +0100 Subject: Updated cabal plugin with Cabal 1.18 commands. --- plugins/cabal/cabal.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/cabal') diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 9f76add7a..acd7f8287 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -23,6 +23,7 @@ function _cabal_commands() { "copy:Copy teh files into the install locations" "configure:Prepare to build the package" "fetch:Downloads packages for later installation" + "get:Gets a package's source code" "haddock:Generate HAddock HTML documentation" "help:Help about commands" "hscolour:Generate HsColour colourised code, in HTML format" @@ -31,7 +32,10 @@ function _cabal_commands() { "install:Installs a list of packages" "list:List packages matching a search string" "register:Register this package with the compiler" + "repl:Open an interpreter session for the given target" "report:Upload build reports to a remote server" + "run:Runs the compiled executable" + "sandbox:Create/modify/delete a sandbox" "sdist:Generate a source distribution file (.tar.gz)" "test:Run the test suite, if any (configure with UserHooks)" "unpack:Unpacks packages for user inspection" -- cgit v1.2.3-70-g09d2 From 859a37d4f14838b20d09b8d7814f270d9b54b8e5 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz Date: Sun, 8 Jun 2014 12:04:52 +0200 Subject: Fixed typo in cabal plugin. --- plugins/cabal/cabal.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/cabal') diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index acd7f8287..3e611ddcc 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -20,7 +20,7 @@ function _cabal_commands() { "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" + "copy:Copy the files into the install locations" "configure:Prepare to build the package" "fetch:Downloads packages for later installation" "get:Gets a package's source code" -- cgit v1.2.3-70-g09d2 From 1ab0f771bc85bbdd86d14e616281cc138c3afe91 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz Date: Sun, 8 Jun 2014 12:08:02 +0200 Subject: Updated cabal commands for Cabal 1.20 --- plugins/cabal/cabal.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/cabal') diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 3e611ddcc..b59438f98 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -17,14 +17,15 @@ function _cabal_commands() { subcommand) subcommands=( "bench:Run the benchmark, if any (configure with UserHooks)" - "build:Make this package ready for installation" + "build:Compile all targets or specific target." "check:Check the package for common mistakes" "clean:Clean up after a build" "copy:Copy the files into the install locations" "configure:Prepare to build the package" + "exec:Run a command with the cabal environment" "fetch:Downloads packages for later installation" "get:Gets a package's source code" - "haddock:Generate HAddock HTML documentation" + "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" -- cgit v1.2.3-70-g09d2 From 1274a5e3ab23720e64cf2044cdbe6aa86d402864 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz Date: Mon, 9 Jun 2014 21:03:09 +0200 Subject: Added cabal freeze subcommand. --- plugins/cabal/cabal.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/cabal') diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index b59438f98..148af5ccf 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -24,6 +24,7 @@ function _cabal_commands() { "configure:Prepare to build the package" "exec:Run a command with the cabal environment" "fetch:Downloads packages for later installation" + "freeze:Freeze dependencies." "get:Gets a package's source code" "haddock:Generate Haddock HTML documentation" "help:Help about commands" -- cgit v1.2.3-70-g09d2 From 3ba10ad0a2ed85c26e096126a7899a401cf8f9e7 Mon Sep 17 00:00:00 2001 From: Ashley Valent Date: Wed, 11 Feb 2015 11:19:42 +1100 Subject: Added cab autocompletion to the cabal plugin. cab is a wrapper for ghc-pkg and cabal that provides some nice features like listing outdated packages. See https://hackage.haskell.org/package/cab for more details on the cab program. --- plugins/cabal/cabal.plugin.zsh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'plugins/cabal') diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 9f76add7a..cf7d2cf5e 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -45,3 +45,43 @@ function _cabal_commands() { } compdef _cabal_commands cabal + +function _cab_commands() { + local ret=1 state + _arguments ':subcommand:->subcommand' && ret=0 + + case $state in + subcommand) + subcommands=( + "sync:Fetch the latest package index" + "install:Install packages" + "uninstall:Uninstall packages" + "installed:List installed packages" + "configure:Configure a cabal package" + "build:Build a cabal package" + "clean:Clean up a build directory" + "outdated:Display outdated packages" + "info:Display information of a package" + "sdist:Make tar.gz for source distribution" + "upload:Uploading tar.gz to HackageDB" + "get:Untar a package in the current directory" + "deps:Show dependencies of this package" + "revdeps:Show reverse dependencies of this package" + "check:Check consistency of packages" + "genpaths:Generate Paths_.hs" + "search:Search available packages by package name" + "add:Add a source directory" + "test:Run tests" + "bench:Run benchmarks" + "doc:Generate manuals" + "ghci:Run GHCi (with a sandbox)" + "init:Initialize a sandbox" + "help:Display the help message of the command" + ) + _describe -t subcommands 'cab subcommands' subcommands && ret=0 + esac + + return ret +} + +command -v cab >/dev/null 2>&1 && { compdef _cab_commands cab } -- cgit v1.2.3-70-g09d2