249fe1471cde3b12366729e5a869dd56c26b07ce

Author
Sven Lito <me@svenlito.com>
Committer
Sven Lito <me@svenlito.com>
Date

Message

adding github plugin

Diff

 1diff --git a/plugins/github/_github b/plugins/github/_github
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..5295081e5ac1974580a57e347cad2a15935f03ec
 4--- /dev/null
 5+++ b/plugins/github/_github
 6@@ -0,0 +1,39 @@
 7+#compdef github
 8+#autoload
 9+
10+# github zsh completion, based on homebrew completion
11+
12+local -a _1st_arguments
13+_1st_arguments=(
14+  'browse:Open this repo in a web browser'
15+  'clone:Clone a repo'
16+  'config:Automatically set configuration info, or pass args to specify'
17+  'create-from-local:Create a new GitHub repository from the current local repository'
18+  'create:Create a new empty GitHub repository'
19+  'fetch:Fetch from a remote to a local branch'
20+  'fetch_all:Fetch all refs from a user'
21+  'fork:Forks a GitHub repository'
22+  'home:Open this repos master branch in a web browser'
23+  'ignore:Ignore a SHA from github network commits'
24+  'info:Info about this project'
25+  'issues:Project issues tools'
26+  'network:Project network tools - sub-commands : web [user], list, fetch, commits'
27+  'network --after:Only show commits after a certain date'
28+  'network --applies:Filter commits to patches that apply cleanly'
29+  'open:Open the given user/project in a web browser'
30+  'pull-request:Generate the text for a pull request'
31+  'pull:Pull from a remote'
32+  'search:Search GitHub for the given repository name'
33+  'track:Track another users repository'
34+)
35+
36+local expl
37+local -a pkgs installed_pkgs
38+
39+_arguments \
40+  '*:: :->subcmds' && return 0
41+
42+if (( CURRENT == 1 )); then
43+  _describe -t commands "github subcommand" _1st_arguments
44+  return
45+fi
46diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
47new file mode 100644
48index 0000000000000000000000000000000000000000..c23504b85b464b411c14abcbe9301e9348ebf5f6
49--- /dev/null
50+++ b/plugins/github/github.plugin.zsh
51@@ -0,0 +1,4 @@
52+# add github completion function to path
53+fpath=($ZSH/plugins/github $fpath)
54+autoload -U compinit
55+compinit -i