Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions shell_completions/zsh/_jenkins
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#compdef jenkins


local -a common_ops
local ret=1 state

common_ops=(
{-h,--help}'[show this help message and exit]'
'--host[Jenkins Server Url]'
'--username[Jenkins Username]'
'--password[Jenkins Password]'
)

typeset -A opt_args
_arguments \
':cmds:->cmds' \
$common_ops \
'*::options:->options' && ret=0

case "$state" in
(cmds)
local commands;
commands=(
'jobs:Show all jobs and their status'
'queue:Shows builds queue'
'building:Build executor status'
'start:Start job'
'info:Job info'
'set_branch:Set branch'
'stop:Stop job'
'console:Show job history'
)
_describe -t commands 'jenkins command' commands && ret=0
;;
esac

return ret