zsh-workers
 help / color / mirror / code / Atom feed
* [patch] _rm: Update BSD options
@ 2016-09-07 12:41 Matthew Martin
  0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2016-09-07 12:41 UTC (permalink / raw)
  To: zsh-workers

This also didn't go through.

args=(${args:#*)--*\[*} to catch all the long options without specifying
each one. Also kills the tabs lurking in the file.

- Matthew Martin


diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
index 4d0dbdb..4a5c9a1 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-07 12:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-07 12:41 [patch] _rm: Update BSD options Matthew Martin

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).