#compdef sboremove

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

# get all installed SBo packages
packages=( ${(uf)"$(perl -MSBO::Lib::Pkgs=get_installed_packages -MSBO::Lib::Tree=get_all_available -E 'get_all_available(); say $_->{name} for @{ get_installed_packages("SBO") };')"} )

_arguments \
    - info \
    '(-)'{-h,--help}'[Show help]:' \
    '(-)'{-v,--version}'[Show version]:' \
    - formatting \
    '--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:
