_github 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # in order to make this work, you would need to have the github gem installed
  2. # http://github.com/defunkt/github-gem
  3. #compdef github
  4. #autoload
  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. 'network --after:Only show commits after a certain date'
  22. 'network --applies:Filter commits to patches that apply cleanly'
  23. 'open:Open the given user/project in a web browser'
  24. 'pull-request:Generate the text for a pull request'
  25. 'pull:Pull from a remote'
  26. 'search:Search GitHub for the given repository name'
  27. 'track:Track another users repository'
  28. )
  29. local expl
  30. local -a pkgs installed_pkgs
  31. _arguments \
  32. '*:: :->subcmds' && return 0
  33. if (( CURRENT == 1 )); then
  34. _describe -t commands "github subcommand" _1st_arguments
  35. return
  36. fi