#compdef sboremove

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

# get all installed SBo packages
packages=( ${(uf)"$(ls /var/log/packages/*_SBo | cut -d'/' -f5 | rev | cut -d- -f4- | rev)"} )

_arguments \
    - info \
    '(-)'{-h,--help}'[Show help]:' \
    '(-)'{-v,--version}'[Show version]:' \
    '(-)'{--nocolor}'[Disable sbotools color output.]:' \
    '(-)'{--color}'[Enable sbotools color output.]:' \
    '(-)'{--nowrap}'[Disable sbotools word wrapping.]:' \
    '(-)'{--wrap}'[Enable sbotools word wrapping.]:' \
    - commands \
    '(-a --alwaysask)'{-a,--alwaysask}'[Always ask to remove requirements (even if required by installed packages).]' \
    '(-p --compat32)'{-p,--compat32}'[Remove compat32 scripts only.]' \
    '(-)*:SlackBuild:(${packages:|words})'

# Local Variables:
# mode: sh
# End:
