diff options
author | Sven Lito <me@svenlito.com> | 2010-10-09 14:29:24 +0100 |
---|---|---|
committer | Sven Lito <me@svenlito.com> | 2010-10-09 14:29:24 +0100 |
commit | 249fe1471cde3b12366729e5a869dd56c26b07ce (patch) | |
tree | 0f5ffaa5541ca30947c856284226b497564dc70b | |
parent | 541da0c9d1cdf88583490fa06b6e307ea09bfc94 (diff) | |
download | zsh-249fe1471cde3b12366729e5a869dd56c26b07ce.tar.gz zsh-249fe1471cde3b12366729e5a869dd56c26b07ce.tar.bz2 zsh-249fe1471cde3b12366729e5a869dd56c26b07ce.zip |
adding github plugin
-rw-r--r-- | plugins/github/_github | 39 | ||||
-rw-r--r-- | plugins/github/github.plugin.zsh | 4 |
2 files changed, 43 insertions, 0 deletions
diff --git a/plugins/github/_github b/plugins/github/_github new file mode 100644 index 000000000..5295081e5 --- /dev/null +++ b/plugins/github/_github @@ -0,0 +1,39 @@ +#compdef github +#autoload + +# github zsh completion, based on homebrew completion + +local -a _1st_arguments +_1st_arguments=( + 'browse:Open this repo in a web browser' + 'clone:Clone a repo' + 'config:Automatically set configuration info, or pass args to specify' + 'create-from-local:Create a new GitHub repository from the current local repository' + 'create:Create a new empty GitHub repository' + 'fetch:Fetch from a remote to a local branch' + 'fetch_all:Fetch all refs from a user' + 'fork:Forks a GitHub repository' + 'home:Open this repos master branch in a web browser' + 'ignore:Ignore a SHA from github network commits' + 'info:Info about this project' + 'issues:Project issues tools' + 'network:Project network tools - sub-commands : web [user], list, fetch, commits' + 'network --after:Only show commits after a certain date' + 'network --applies:Filter commits to patches that apply cleanly' + 'open:Open the given user/project in a web browser' + 'pull-request:Generate the text for a pull request' + 'pull:Pull from a remote' + 'search:Search GitHub for the given repository name' + 'track:Track another users repository' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "github subcommand" _1st_arguments + return +fi diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh new file mode 100644 index 000000000..c23504b85 --- /dev/null +++ b/plugins/github/github.plugin.zsh @@ -0,0 +1,4 @@ +# add github completion function to path +fpath=($ZSH/plugins/github $fpath) +autoload -U compinit +compinit -i |