_xbps_src: add completions for all commands

This commit is contained in:
Leah Neukirchen 2019-07-18 14:44:57 +02:00 committed by Duncaen
parent 7e2e1e3235
commit 87c6653837

View File

@ -49,24 +49,28 @@ _arguments -s : \
case $state in
target)
_values "target" binary-bootstrap bootstrap bootstrap-update \
build chroot clean configure extract fetch install \
list patch pkg remove remove-autodeps show show-build-deps \
show-deps show-files show-options show-shlib-provides \
build check chroot clean clean-repocache configure \
consistency-check extract fetch install \
list patch pkg purge-distfiles remove remove-autodeps \
show show-avail show-build-deps \
show-deps show-hostmakedepends show-makedepends \
show-files show-options show-shlib-provides \
show-shlib-requires show-var show-repo-updates \
show-sys-updates update-bulk update-check update-sys zap
show-sys-updates update-bulk update-check update-sys \
update-hash-cache zap
ret=0;;
args)
case $words[1] in
build|configure|extract|fetch|install|pkg|show|show-build-deps|update-check)
build|check|configure|extract|fetch|install|patch|pkg|show|show-avail|show-build-deps|show-hostmakedepends|show-makedepends|show-options|update-check)
_arguments ':package:_xbps_src_all_packages' && ret=0;;
binary-bootstrap)
_arguments '::architecture:($archs)' && ret=0;;
bootstrap|bootstrap-update|chroot|list|remove-autodeps|show-repo-updates|show-sys-updates|update-bulk|update-sys)
bootstrap|bootstrap-update|chroot|clean-repocache|consistency-check|list|purge-distfiles|remove-autodeps|show-repo-updates|show-sys-updates|update-bulk|update-sys|update-hash-cache)
# no further arguments
ret=0;;
clean)
_arguments '::package:_xbps_src_build_packages' && ret=0;;
remove|show-deps|show-files|show-options|show-shlib-provides|show-shlib-requires)
remove|show-deps|show-files|show-shlib-provides|show-shlib-requires)
_arguments ':package:_xbps_src_destdir_packages' && ret=0;;
esac;;
esac