aboutsummaryrefslogtreecommitdiffstats
path: root/_github
diff options
context:
space:
mode:
authorJulien Nicoulaud <julien.nicoulaud@gmail.com>2011-09-02 15:43:22 +0200
committerJulien Nicoulaud <julien.nicoulaud@gmail.com>2011-09-02 15:43:22 +0200
commit4e117ea0ddff44bfe26495af459f5befaf6cdd77 (patch)
tree24fbf99db7c3ab2aef31ae09c28ce2faa53ee0d0 /_github
parent#23 github: complete 'issues' command (diff)
downloadzsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.tar
zsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.tar.gz
zsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.tar.bz2
zsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.tar.lz
zsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.tar.xz
zsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.tar.zst
zsh-completions-4e117ea0ddff44bfe26495af459f5befaf6cdd77.zip
#23 github: complete 'network' command
Diffstat (limited to '_github')
-rw-r--r--_github45
1 files changed, 40 insertions, 5 deletions
diff --git a/_github b/_github
index 00acb65..e4e36a7 100644
--- a/_github
+++ b/_github
@@ -107,14 +107,14 @@ _github() {
&& ret=0
;;
(issues)
- _arguments \
- '1:cmd:->cmds' \
+ _arguments -C \
+ '1:issue-status:->issue-statuses' \
'2:: :_github_users' \
'--after[only show issues updated after a certain date]:date' \
'--label[only show issues with a certain label]:label' \
&& ret=0
case "$state" in
- (cmds)
+ (issue-statuses)
local statuses; statuses=(
'open:show open issues'
'closed:show closed issues'
@@ -124,8 +124,43 @@ _github() {
esac
;;
(network)
- # TODO Not implemented
- _message "${words[1]} command argument" && ret=0
+ _arguments -C \
+ '1:network-subcommand:->network-subcommands' \
+ '*::network-arg:->network-args' \
+ '(--after)--before[only show commits before a certain date]:date' \
+ '(--before)--after[only show commits after a certain date]:date' \
+ '--applies[filter commits to patches that apply cleanly]' \
+ '--author[filter commits on a email address of author]:author' \
+ '--cache[use the network data even if it'\''s expired]' \
+ '--common[show common branch point]' \
+ '--limit[only look through the first X heads - useful for really large projects]:number' \
+ '--noapply[filter commits to patches that do not apply cleanly]' \
+ '--nocache[do not use the cached network data]' \
+ '--project[filter commits on a certain project]:project' \
+ '--shas[only show shas]' \
+ '--sort[how to sort : date, branch, author]:sort type:((date\:sort\ by\ date\ \(default\) branch\:sort\ by\ branch author\:sort\ by\ author))' \
+ '--thisbranch[look at branches that match the current one]' \
+ && ret=0
+ case "$state" in
+ (network-subcommands)
+ local subcommands; subcommands=(
+ 'web:open network in a web browser'
+ 'list:list network members'
+ 'fetch:fetch network members commits'
+ 'commits:list network members commits'
+ )
+ _describe -t subcommands 'subcommand' subcommands && ret=0
+ ;;
+ (network-args)
+ case $words[1] in
+ (web)
+ _arguments \
+ '1: :_github_users' \
+ && ret=0
+ ;;
+ esac
+ ;;
+ esac
;;
(open)
# TODO Not implemented