#compdef sboclean

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

# SlackBuilds with saved options
slackbuilds=( ${(uf)"$(find /var/log/sbotools -type f -exec basename {} \;)"} )

_arguments -s \
	   - info \
	   '(-)'{-h,--help}'[Show help.]:' \
	   '(-)'{-v,--version}'[Show version.]:' \
	   - commands \
    	   '(-d --dist)'{-d,--dist}'[Clean distfiles (default /usr/sbo/distfiles).]' \
    	   '(-w --work)'{-w,--work}'[Clean working directories (default /tmp/SBo; /tmp for compat32).]' \
	   '(-o --options)'{-o,--options}'[Clean saved options (ALL for all saved).]:SlackBuild:(${slackbuilds})' \
    	   '(-i --interactive)'{-i,--interactive}'[Ask for confirmation for each item to be removed.]' \
	   '(--nocolor)'{--nocolor}'[Disable sbotools color output.]:' \
	   '(--color)'{--color}'[Enable sbotools color output.]:' \
	   '(--nowrap)'{--nowrap}'[Disable sbotools word wrapping.]:' \
	   '(--wrap)'{--wrap}'[Enable sbotools word wrapping.]:' \
    && return 0

return 1

# Local Variables:
# mode: sh
# End:
