diff options
Diffstat (limited to 'Completion/Unix/Command/_rmdir')
-rw-r--r-- | Completion/Unix/Command/_rmdir | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/Completion/Unix/Command/_rmdir b/Completion/Unix/Command/_rmdir index 0f5e16912..2ae0fd9b2 100644 --- a/Completion/Unix/Command/_rmdir +++ b/Completion/Unix/Command/_rmdir @@ -1,22 +1,30 @@ #compdef rmdir grmdir +local variant local -a args args=( '(-p --parents)'{-p,--parents}'[remove each component of the specified paths]' ) -if _pick_variant gnu=GNU unix --version; then - args+=( - '--ignore-fail-on-non-empty[ignore failure if directory is non-empty]' - '(-v --verbose)'{-v,--verbose}'[be verbose]' - ) -else - args=(${args:#*\)--*}) - if [[ $OSTYPE == (dragonfly|freebsd)* ]]; then +_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]') - fi -fi + ;; +esac _arguments -s -S -A '-*' \ $args \ |