about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2016-09-07 07:41:24 -0500
committerPeter Stephenson <pws@zsh.org>2016-09-07 14:22:28 +0100
commitc001d1f2a2eb7c3ddea1c1f09ca6660070befaa3 (patch)
treee4e9ec5c9b004baa0559f8ba1bacf2c43d457bfa
parentc47c35caccfdd43db76668998382a67e1ad30054 (diff)
downloadzsh-c001d1f2a2eb7c3ddea1c1f09ca6660070befaa3.tar.gz
zsh-c001d1f2a2eb7c3ddea1c1f09ca6660070befaa3.tar.xz
zsh-c001d1f2a2eb7c3ddea1c1f09ca6660070befaa3.zip
39221: update rm completion for BSD
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_rm22
2 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 148536961..cb7405a85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-09-07  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* Matthew Martin: 39221: Completion/Unix/Command/_rm: update for
+	BSD.
+
 	* 39218: Src/module.c: fix feature enables with math functions
 	present.  This caused parameters to be miscounted.
 
diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
index 4d0dbdb3f..4a5c9a178 100644
--- a/Completion/Unix/Command/_rm
+++ b/Completion/Unix/Command/_rm
@@ -22,16 +22,24 @@ if _pick_variant gnu=gnu unix --help; then
     '(- *)--version[output version information and exit]'
   )
 else
-  args=(${args:#*--(force|recursive)\[*})
+  args=(${args:#*)--*\[*})
   case $OSTYPE in
-    freebsd*)
+    dragonfly*|freebsd*|netbsd*|openbsd*)
       args+=(
         '-d[remove directories as well]'
-	'(-i)-I[prompt when removing many files]'
-	'-P[overwrite files before deleting them]'
-	'-v[explain what is being done]'
-	'-W[attempt to undelete named files]'
-	"-x[don't cross file systems when removing a hierarchy]"
+        '-P[overwrite files before deleting them]'
+      )
+    ;;
+    dragonfly*|freebsd*|netbsd*)
+      args+=(
+        '-v[explain what is being done]'
+        '-W[attempt to undelete named files]'
+        "-x[don't cross file systems when removing a hierarchy]"
+      )
+    ;;
+    dragonfly*|freebsd*)
+      args+=(
+        '(-i)-I[prompt when removing many files]'
       )
     ;;
   esac