stack.plugin.zsh 1.6 KB

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