cabal.plugin.zsh 1.5 KB

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