Browse code

adding github plugin

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