25f2d590481fc6c23b0f20c6757b20d7d1eeb3e1

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #4353 from dzotokan/feat/stackPlugin

Add Haskell Stack commands list

Diff

 1diff --git a/plugins/stack/stack.plugin.zsh b/plugins/stack/stack.plugin.zsh
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..a149208d0ab364ded6ce46c1ed19da75597737d9
 4--- /dev/null
 5+++ b/plugins/stack/stack.plugin.zsh
 6@@ -0,0 +1,37 @@
 7+function _stack_commands() {
 8+    local ret=1 state
 9+    _arguments ':subcommand:->subcommand' && ret=0
10+
11+    case $state in
12+      subcommand)
13+        subcommands=(
14+          "build:Build the project(s) in this directory/configuration"
15+          "install:Build executables and install to a user path"
16+          "test:Build and test the project(s) in this directory/configuration"
17+          "bench:Build and benchmark the project(s) in this directory/configuration"
18+          "haddock:Generate haddocks for the project(s) in this directory/configuration"
19+          "new:Create a brand new project"
20+          "init:Initialize a stack project based on one or more stack packages"
21+          "solver:Use a dependency solver to try and determine missing extra-deps"
22+          "setup:Get the appropriate ghc for your project"
23+          "path:Print out handy path information"
24+          "unpack:Unpack one or more packages locally"
25+          "update:Update the package index"
26+          "upgrade:Upgrade to the latest stack (experimental)"
27+          "upload:Upload a package to Hackage"
28+          "dot:Visualize your project's dependency graph using Graphviz dot"
29+          "exec:Execute a command"
30+          "ghc:Run ghc"
31+          "ghci:Run ghci in the context of project(s)"
32+          "ide:Run ide-backend-client with the correct arguments"
33+          "runghc:Run runghc"
34+          "clean:Clean the local packages"
35+          "docker:Subcommands specific to Docker use"
36+        )
37+        _describe -t subcommands 'stack subcommands' subcommands && ret=0
38+    esac
39+
40+    return ret
41+}
42+
43+compdef _stack_commands stack