mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
Add zsh completion for build command
Signed-off-by: Björn Bidar <bjorn.bidar@jolla.com>
This commit is contained in:
parent
513fd3664f
commit
a1396e62be
@ -85,6 +85,7 @@ _osc() {
|
||||
case $cmd in
|
||||
submitrequest|submitreq|sr) _osc_cmd_submitreq ;;
|
||||
getbinaries) _osc_cmd_getbinaries ;;
|
||||
build) _osc_cmd_build ;;
|
||||
checkout|co|branch|getpac|bco|branchco) _osc_cmd_checkout ;;
|
||||
buildlog|buildinfo|bl|blt|buildlogtail) _osc_cmd_buildlog ;;
|
||||
*) _osc_cmd_do $cmd
|
||||
@ -218,6 +219,22 @@ _osc_cmd_buildlog() {
|
||||
fi
|
||||
}
|
||||
|
||||
_osc_cmd_build() {
|
||||
if [ "$words[2]" = "-" ]; then
|
||||
_osc_complete_help_commands 'options' 'option'
|
||||
return
|
||||
else
|
||||
if [ -n "$words[2]" ] ; then
|
||||
local osc_project_repository_arch=$(_osc_project_repositories_arches \
|
||||
"${words[2]}")
|
||||
fi
|
||||
_arguments \
|
||||
'1:REPOSITORY:( `_osc_project_repositories` )' \
|
||||
'2:ARCHITECTURE:(`echo $osc_project_repository_arch`)' \
|
||||
'3:Build Description:_files'
|
||||
fi
|
||||
}
|
||||
|
||||
_osc_cmd_submitreq() {
|
||||
_osc_complete_help_commands 'options' 'option'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user