diff options
Diffstat (limited to 'completions/zsh/_sboupgrade')
-rw-r--r-- | completions/zsh/_sboupgrade | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/completions/zsh/_sboupgrade b/completions/zsh/_sboupgrade new file mode 100644 index 0000000..bc6ff2d --- /dev/null +++ b/completions/zsh/_sboupgrade @@ -0,0 +1,28 @@ +#compdef sboupgrade + +# sbotools: https://pink-mist.github.io/sbotools/ + +# get a list of available upgrades +sboupdates=( ${(uf)"$(perl -MSBO::Lib::Pkgs=get_available_updates -E 'say $_->{name} for @{ get_available_updates; }')"} ) + +_arguments -s -C \ + - info \ + '(-)'{-h,--help}'[Show help]:' \ + '(-)'{-v,--version}'[Show version information.]:' \ + - commands \ + '(${sboupdates})--all[Upgrade all from sbocheck.]' \ + '(-c --noclean)'{-c,--noclean}'[If TRUE, then do not clean working directories after build.]:clean work dirs?:((TRUE\:"Clean works directories" FALSE\:"Keep work directories"))' \ + '(-d --distclean)'{-d,--distclean}'[If TRUE, then remove source code after building.]:clean source?:((TRUE\:"Remove source" FALSE\:"Keep source"))' \ + '(-j --jobs)'{-j,--jobs}'[Number fed to -j# for make.]:number of jobs (make):()' \ + '(-r --nointeractive)'{-r,--nointeractive}'[Skip README.]' \ + '(-f --force)'{-f,--force}'[Force an upgrade (ignore version).]' \ + '(-z --force-reqs)'{-z,--force-reqs}'[Force update of requirements (use with -f).]' \ + '(-i --noinstall)'{-i,--noinstall}'[Build package but do not install.]' \ + '(-)*:SlackBuild:(${sboupdates:|words})' \ + && return 0 + +return 1 + +# Local Variables: +# mode: sh +# End: |