API-CLI
view release on metacpan or search on metacpan
examples/zsh/_githubcl view on Meta::CPAN
#compdef githubcl
_githubcl() {
local program=githubcl
typeset -A opt_args
local curcontext="$curcontext" state line context
# ---- Command:
_arguments -s \
'1: :->cmd1' \
'*: :->args' \
&& ret=0
case $state in
cmd1)
_alternative 'args:cmd2:((DELETE\:"DELETE call" GET\:"GET call" PATCH\:"PATCH call" POST\:"POST call" PUT\:"PUT call" help\:"Show command help"))'
;;
args)
case $line[1] in
DELETE)
# ---- Command: DELETE
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'*: :->args' \
&& ret=0
case $state in
cmd2)
_alternative 'args:cmd3:((/gists/\\:id\:"Delete a gist." /gists/\\:id/comments/\\:commentId\:"Delete a comment." /gists/\\:id/star\:"Unstar a gist." /notifications/threads/\\:id/subscription\:"Delete a Thread Subscription." /orgs/...
;;
args)
case $line[2] in
/gists/:id)
# ---- Command: DELETE /gists/:id
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->id' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
id)
;;
esac
;;
/gists/:id/comments/:commentId)
# ---- Command: DELETE /gists/:id/comments/:commentId
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->id' \
'4: :->commentId' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
id)
;;
commentId)
;;
esac
;;
/gists/:id/star)
# ---- Command: DELETE /gists/:id/star
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
examples/zsh/_githubcl view on Meta::CPAN
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
owner)
;;
repo)
;;
esac
;;
/user/subscriptions/:owner/:repo)
# ---- Command: DELETE /user/subscriptions/:owner/:repo
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
owner)
;;
repo)
;;
esac
;;
esac
;;
esac
;;
GET)
# ---- Command: GET
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'*: :->args' \
&& ret=0
case $state in
cmd2)
_alternative 'args:cmd3:((/emojis\:"Lists all the emojis available to use on GitHub...." /events\:"List public events." /feeds\:"List Feeds." /gists\:"List the authenticated user'"'"'s gists or if called a..." /gists/\\:id\:"Get a...
;;
args)
case $line[2] in
/emojis)
# ---- Command: GET /emojis
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
;;
/events)
# ---- Command: GET /events
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
;;
/feeds)
# ---- Command: GET /feeds
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
;;
/gists)
# ---- Command: GET /gists
_arguments -s -C \
'1: :->cmd1' \
examples/zsh/_githubcl view on Meta::CPAN
'--q-labels[String list of comma separated Label names. Example - bug,ui,@high.]:q-labels' \
'--q-sort[]:q-sort:("created" "updated" "comments")' \
'--q-direction[]:q-direction:("asc" "desc")' \
'--q-since[Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only issues updated at or after this time are returned.
]:q-since' \
&& ret=0
;;
/legacy/issues/search/:owner/:repository/:state/:keyword)
# ---- Command: GET /legacy/issues/search/:owner/:repository/:state/:keyword
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->keyword' \
'4: :->state' \
'5: :->owner' \
'6: :->repository' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
keyword)
;;
state)
compadd -X 'state:' 'open' 'closed'
;;
owner)
;;
repository)
;;
esac
;;
/legacy/repos/search/:keyword)
# ---- Command: GET /legacy/repos/search/:keyword
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->keyword' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-order[The sort field. if sort param is provided. Can be either asc or desc.]:q-order:("desc" "asc")' \
'--q-language[Filter results by language]:q-language' \
'--q-start_page[The page number to fetch]:q-start_page' \
'--q-sort[The sort field. One of stars, forks, or updated. Default: results are sorted by best match.]:q-sort:("updated" "stars" "forks")' \
&& ret=0
case $state in
keyword)
;;
esac
;;
/legacy/user/email/:email)
# ---- Command: GET /legacy/user/email/:email
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->email' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
email)
;;
esac
;;
/legacy/user/search/:keyword)
# ---- Command: GET /legacy/user/search/:keyword
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->keyword' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-order[The sort field. if sort param is provided. Can be either asc or desc.]:q-order:("desc" "asc")' \
'--q-start_page[The page number to fetch]:q-start_page' \
'--q-sort[The sort field. One of stars, forks, or updated. Default: results are sorted by best match.]:q-sort:("updated" "stars" "forks")' \
&& ret=0
case $state in
keyword)
;;
esac
;;
/meta)
# ---- Command: GET /meta
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
;;
/networks/:owner/:repo/events)
# ---- Command: GET /networks/:owner/:repo/events
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
owner)
;;
repo)
;;
esac
;;
/notifications)
# ---- Command: GET /notifications
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
examples/zsh/_githubcl view on Meta::CPAN
repo)
;;
baseId)
;;
headId)
;;
esac
;;
/repos/:owner/:repo/contents/:path)
# ---- Command: GET /repos/:owner/:repo/contents/:path
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'5: :->path' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-path[The content path.]:q-path' \
'--q-ref[The String name of the Commit/Branch/Tag. Defaults to '"'"'master'"'"'.]:q-ref' \
&& ret=0
case $state in
owner)
;;
repo)
;;
path)
;;
esac
;;
/repos/:owner/:repo/contributors)
# ---- Command: GET /repos/:owner/:repo/contributors
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-anon[Set to 1 or true to include anonymous contributors in results.]:q-anon' \
&& ret=0
case $state in
owner)
;;
repo)
;;
esac
;;
/repos/:owner/:repo/deployments)
# ---- Command: GET /repos/:owner/:repo/deployments
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
owner)
;;
repo)
;;
esac
;;
/repos/:owner/:repo/deployments/:id/statuses)
# ---- Command: GET /repos/:owner/:repo/deployments/:id/statuses
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'5: :->id' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
owner)
examples/zsh/_githubcl view on Meta::CPAN
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->owner' \
'4: :->repo' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
owner)
;;
repo)
;;
esac
;;
/repositories)
# ---- Command: GET /repositories
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-since[The time should be passed in as UTC in the ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Example: "2012-10-09T23:39:01Z".
]:q-since' \
&& ret=0
;;
/search/code)
# ---- Command: GET /search/code
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-order[The sort field. if sort param is provided. Can be either asc or desc.]:q-order:("desc" "asc")' \
'--q-q[The search terms. This can be any combination of the supported code
search parameters:
'"'"'Search In'"'"' Qualifies which fields are searched. With this qualifier
you can restrict the search to just the file contents, the file path,
or both.
'"'"'Languages'"'"' Searches code based on the language it'"'"'s written in.
'"'"'Forks'"'"' Filters repositories based on the number of forks, and/or
whether code from forked repositories should be included in the results
at all.
'"'"'Size'"'"' Finds files that match a certain size (in bytes).
'"'"'Path'"'"' Specifies the path that the resulting file must be at.
'"'"'Extension'"'"' Matches files with a certain extension.
'"'"'Users'"'"' or '"'"'Repositories'"'"' Limits searches to a specific user or repository.
]:q-q' \
'--q-sort[Can only be '"'"'indexed'"'"', which indicates how recently a file has been indexed
by the GitHub search infrastructure. If not provided, results are sorted
by best match.
]:q-sort:("indexed")' \
&& ret=0
;;
/search/issues)
# ---- Command: GET /search/issues
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-order[The sort field. if sort param is provided. Can be either asc or desc.]:q-order:("desc" "asc")' \
'--q-q[The q search term can also contain any combination of the supported issue search qualifiers:]:q-q' \
'--q-sort[The sort field. Can be comments, created, or updated. Default: results are sorted by best match.]:q-sort:("updated" "created" "comments")' \
&& ret=0
;;
/search/repositories)
# ---- Command: GET /search/repositories
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-order[The sort field. if sort param is provided. Can be either asc or desc.]:q-order:("desc" "asc")' \
'--q-q[The search terms. This can be any combination of the supported repository
search parameters:
'"'"'Search In'"'"' Qualifies which fields are searched. With this qualifier you
can restrict the search to just the repository name, description, readme,
or any combination of these.
'"'"'Size'"'"' Finds repositories that match a certain size (in kilobytes).
'"'"'Forks'"'"' Filters repositories based on the number of forks, and/or whether
forked repositories should be included in the results at all.
'"'"'Created'"'"' and '"'"'Last Updated'"'"' Filters repositories based on times of
creation, or when they were last updated.
'"'"'Users or Repositories'"'"' Limits searches to a specific user or repository.
'"'"'Languages'"'"' Searches repositories based on the language they are written in.
'"'"'Stars'"'"' Searches repositories based on the number of stars.
]:q-q' \
'--q-sort[If not provided, results are sorted by best match.]:q-sort:("stars" "forks" "updated")' \
&& ret=0
;;
/search/users)
# ---- Command: GET /search/users
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
'--q-order[The sort field. if sort param is provided. Can be either asc or desc.]:q-order:("desc" "asc")' \
'--q-q[The search terms. This can be any combination of the supported user
search parameters:
'"'"'Search In'"'"' Qualifies which fields are searched. With this qualifier you
can restrict the search to just the username, public email, full name,
location, or any combination of these.
'"'"'Repository count'"'"' Filters users based on the number of repositories they
have.
'"'"'Location'"'"' Filter users by the location indicated in their profile.
'"'"'Language'"'"' Search for users that have repositories that match a certain
language.
'"'"'Created'"'"' Filter users based on when they joined.
'"'"'Followers'"'"' Filter users based on the number of followers they have.
]:q-q' \
'--q-sort[If not provided, results are sorted by best match.]:q-sort:("followers" "repositories" "joined")' \
&& ret=0
;;
/teams/:teamId)
# ---- Command: GET /teams/:teamId
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->teamId' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
teamId)
;;
esac
;;
/teams/:teamId/members)
# ---- Command: GET /teams/:teamId/members
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->teamId' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
teamId)
;;
esac
;;
/teams/:teamId/members/:username)
# ---- Command: GET /teams/:teamId/members/:username
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->teamId' \
'4: :->username' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
examples/zsh/_githubcl view on Meta::CPAN
;;
/teams/:teamId)
# ---- Command: PATCH /teams/:teamId
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->teamId' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
teamId)
;;
esac
;;
/user)
# ---- Command: PATCH /user
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
;;
esac
;;
esac
;;
POST)
# ---- Command: POST
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'*: :->args' \
&& ret=0
case $state in
cmd2)
_alternative 'args:cmd3:((/gists\:"Create a gist." /gists/\\:id/comments\:"Create a commen" /gists/\\:id/forks\:"Fork a gist." /markdown\:"Render an arbitrary Markdown document..." /markdown/raw\:"Render a Markdown document in raw...
;;
args)
case $line[2] in
/gists)
# ---- Command: POST /gists
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
;;
/gists/:id/comments)
# ---- Command: POST /gists/:id/comments
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->id' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
case $state in
id)
;;
esac
;;
/gists/:id/forks)
# ---- Command: POST /gists/:id/forks
_arguments -s -C \
'1: :->cmd1' \
'2: :->cmd2' \
'3: :->id' \
'--data-file[File with data for POST/PUT/PATCH/DELETE requests]:data-file:_files' \
'--debug[debug]' \
'-d[debug]' \
'--verbose[verbose]' \
'-v[verbose]' \
'--help[Show command help]' \
'-h[Show command help]' \
&& ret=0
( run in 1.460 second using v1.01-cache-2.11-cpan-d8267643d1d )