#compdef sboconfig

# sbotools: https://pghvlaans.github.io/sbotools/

_arguments \
    - info \
    '(-)'{-h,--help}'[Show help.]:' \
    '(-)'{-v,--version}'[Show version.]:' \
    '(-)'{-l,--list}'[List current configuration options (including unmodified defaults).]:' \
    '(-)'{-n,--non-default}'[List current non-default configuration options.]:' \
    '(-)'{--reset}'[Restore all default configuration options.]:' \
    - commands \
    '(-B --git-branch)'{-B,--git-branch}'[Use this git branch (instead of the default for the Slackware version).]:Git branch:()' \
    '(-b --build-ignore)'{-b,--build-ignore}'[If TRUE, then only do upgrades if the version number differs.]:ignore build number?:((TRUE\:"Version upgrades only" FALSE\:"Script bump upgrades"))' \
    '(-C --classic)'{-C,--classic}'[If TRUE, a more traditional sbotools look and feel; see the man pages before turning this on.]:use Classic Mode?:((TRUE\:"Classic Mode" FALSE\:"No Classic Mode"))' \
    '(-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 --dialogrc)'{-D,--dialogrc}'[File to use as dialogrc for sbotool.]:sbotool dialogrc location:_files -/' \
    '(-d --distclean)'{-d,--distclean}'[If TRUE, then remove source code and the package after building.]:clean source and package?:((TRUE\:"Remove source and package" FALSE\:"Keep source and package"))' \
    '(-e --etc-profile)'{-e,--etc-profile}'[If TRUE, then source any *.sh executable scripts in /etc/profile.d before running each SlackBuild.]:source /etc/profile.d?:((TRUE\:"Source profile scripts" FALSE\:"Do not source profile scripts"))' \
    '(-g --gpg-verify)'{-g,--gpg-verify}'[If TRUE, then verify with gpg.]:use gpg?:((TRUE\:"Verify with gpg" FALSE\:"Do not verify"))' \
    '(-j --jobs)'{-j,--jobs}'[Number fed to -j# for make.]:number of jobs (make):()' \
    '(-K --color)'{-K,--color}'[If TRUE, enable sbotools color output.]:enable sbotools colors?:((TRUE\:"Enable sbotools colors" FALSE\:"sbotools output has no color"))' \
    '(-L --log-dir)'{-L,--log-dir}'[Directory to store build logs in.]:build log directory:_files -/' \
    '(-O --obsolete-check)'{-o,--obsolete-check}'[if TRUE, then update the list of obsoleted scripts when running sbocheck on -current.]:update the obsolete script list on -current?:((TRUE\:"Download the file from the sbotools home page." FALSE\:"Retain the copy in /etc/sbotools."))' \
    '(-P --cpan-ignore)'{-P,--cpan-ignore}'[If TRUE, then install scripts even if they are installed from the CPAN.]:ignore CPAN modules?:((TRUE\:"Ignore CPAN modules" FALSE\:"Account for CPAN modules"))' \
    '(-p --pkg-dir)'{-p,--pkg-dir}'[Directory to store built packages in.]:package directory:_files -/' \
    '(-s --sbo-home)'{-s,--sbo-home}'[Directory for SBo tree (default /usr/sbo).]:SBo home dir:_files -/' \
    '(-o --local-overrides)'{-o,--local-overrides}'[Directory for local SlackBuild overrides.]:overrides directory:_files -/' \
    '(-V --slackware-version)'{-V,--slackware-version}'[Use SBo repo for this version (instead of /etc/slackware-version).]:Slackware version:()' \
    '(-r --repo)'{-r,--repo}'[Use git/rsync repo at URL instead of the SBo repo for your SLACKWARE_VERSION.]:repo URL:()' \
    '(-R --rsync)'{-R,--rsync}'[If TRUE, then default mirrors are rsync except for -current.]:rsync default mirror?:((TRUE\:"Default mirrors are rsync." FALSE\:"No rsync preference."))' \
    '(-S --strict-upgrades)'{-S,--strict-upgrades}'[If TRUE, then only perform non-override upgrades if the version or build number is greater.]:strict versions?:((TRUE\:"Strict upgrades only." FALSE\:"Upgrade on differing version and build number."))' \
    '(-w --nowrap)'{-w,--nowrap}'[If TRUE, then do not wrap sbotools output.]:disable sbotools output wrapping?:((TRUE\:"Wrapping is disabled." FALSE\:"Wrapping is enabled."))' \
    '(-X --so-check)'{-X,--so-check}'[If TRUE, then check for missing shared objects when running sbocheck and sboupgrade.]:sbocheck and sboupgrade check for missing .so dependencies?:((TRUE\:"sbocheck and sboupgrade find missing shared objects." FALSE\:"No automatic shared object check."))' \
    && return 0

return 1

# Local Variables:
# mode: sh
# End:
