#23 github: complete 'fork' command
This commit is contained in:
parent
d38b8a2668
commit
c501c18a2c
17
_github
17
_github
|
@ -97,8 +97,9 @@ _github() {
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(fork)
|
(fork)
|
||||||
# TODO Not implemented
|
_arguments \
|
||||||
_message "${words[1]} command argument" && ret=0
|
'1: :_github_user_slash_repos' \
|
||||||
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(home)
|
(home)
|
||||||
# TODO Not implemented
|
# TODO Not implemented
|
||||||
|
@ -161,4 +162,16 @@ _github_branches() {
|
||||||
_message -e branches 'branch'
|
_message -e branches 'branch'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(( $+functions[_github_user_slash_repos] )) ||
|
||||||
|
_github_user_slash_repos() {
|
||||||
|
local ret=1
|
||||||
|
if compset -P '*/'; then
|
||||||
|
# TODO Make it contextual to the user
|
||||||
|
_wanted repos expl 'repo' _github_repos && ret=0
|
||||||
|
else
|
||||||
|
_wanted users expl 'user' _github_users -qS/ && ret=0
|
||||||
|
fi
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
_github "$@"
|
_github "$@"
|
||||||
|
|
Loading…
Reference in New Issue