_github 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #compdef github
  2. #autoload
  3. # in order to make this work, you will need to have the github gem installed
  4. # http://github.com/defunkt/github-gem
  5. # github zsh completion, based on homebrew completion
  6. local -a _1st_arguments
  7. _1st_arguments=(
  8. 'browse:Open this repo in a web browser'
  9. 'clone:Clone a repo'
  10. 'config:Automatically set configuration info, or pass args to specify'
  11. 'create-from-local:Create a new GitHub repository from the current local repository'
  12. 'create:Create a new empty GitHub repository'
  13. 'fetch:Fetch from a remote to a local branch'
  14. 'fetch_all:Fetch all refs from a user'
  15. 'fork:Forks a GitHub repository'
  16. 'home:Open this repos master branch in a web browser'
  17. 'ignore:Ignore a SHA from github network commits'
  18. 'info:Info about this project'
  19. 'issues:Project issues tools'
  20. 'network:Project network tools - sub-commands : web [user], list, fetch, commits'
  21. 'open:Open the given user/project in a web browser'
  22. 'pull-request:Generate the text for a pull request'
  23. 'pull:Pull from a remote'
  24. 'search:Search GitHub for the given repository name'
  25. 'track:Track another users repository'
  26. )
  27. local expl
  28. local -a pkgs installed_pkgs
  29. _arguments \
  30. '*:: :->subcmds' && return 0
  31. if (( CURRENT == 1 )); then
  32. _describe -t commands "github subcommand" _1st_arguments
  33. return
  34. fi