summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2018-04-28 00:01:13 -0500
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-04-29 23:54:40 +0200
commit11dbc95962897ba5aff905cda2d55d064f52e3a9 (patch)
treefec1e30c30ac30876f8ddfb01524545695b0de27 /Completion
parent17af784c5dd5f3035574e1ecf99346e8ce16d358 (diff)
downloadzsh-11dbc95962897ba5aff905cda2d55d064f52e3a9.tar.gz
zsh-11dbc95962897ba5aff905cda2d55d064f52e3a9.tar.xz
zsh-11dbc95962897ba5aff905cda2d55d064f52e3a9.zip
42730: Complete the options for rmdir
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_rmdir23
-rw-r--r--Completion/Unix/Type/_directories2
2 files changed, 24 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_rmdir b/Completion/Unix/Command/_rmdir
new file mode 100644
index 000000000..0f5e16912
--- /dev/null
+++ b/Completion/Unix/Command/_rmdir
@@ -0,0 +1,23 @@
+#compdef rmdir grmdir
+
+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
+    args+=('-v[be verbose]')
+  fi
+fi
+
+_arguments -s -S -A '-*' \
+  $args \
+  '*:directories:_directories'
diff --git a/Completion/Unix/Type/_directories b/Completion/Unix/Type/_directories
index 456af3b6c..438181eec 100644
--- a/Completion/Unix/Type/_directories
+++ b/Completion/Unix/Type/_directories
@@ -1,4 +1,4 @@
-#compdef rmdir grmdir zf_rmdir dircmp -P -value-,*path,-default-
+#compdef zf_rmdir dircmp -P -value-,*path,-default-
 
 local expl