#compdef rmdir grmdir local variant local -a args args=( '(-p --parents)'{-p,--parents}'[remove each component of the specified paths]' ) _pick_variant -r variant -b zsh gnu=GNU $OSTYPE --version case $variant; in gnu) args+=( '--ignore-fail-on-non-empty[ignore failure if directory is non-empty]' '(-v --verbose)'{-v,--verbose}'[be verbose]' ) ;; zsh) args=() ;; *) args=(${args:#*\)--*}) ;| dragonfly*|freebsd*) args+=('-v[be verbose]') ;; esac _arguments -s -S -A '-*' \ $args \ '*:directories:_directories'