Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] _rm: Update BSD options
- X-seq: zsh-workers 39221
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] _rm: Update BSD options
- Date: Wed, 7 Sep 2016 07:41:24 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=TAuuiAR2hW6/42PFXhVxbP1hHiFE8uZN4f3eJvhEM5s=; b=nVvgLAw8ERqCIphHXwFqxhHfdbGqWSvIhF26Ucw9yN0/txB667Haov/NzWKpje6hsb R6fIhp8E5H0+q22YZppeuuiCWkLM2C8IUqt5h0n6oIUEbzlIbHMJ7+OB7zhD+Km7RgCV nb5ny4iUY9R1mixEs3kN4IhS4OxJ6Q9aFgcrQHK/N/Xc+ia7NMKxdvVeNn7YlHTIS6uo vPJnHy/LhvWNUtIJa7Z5T9Z+Wdw+vC18FphCzECFF9E0hZrOSOJaWdnETE/z6OskkUOY zzHiTdgLJHZFPecl5xYepoHwVR7pv8vrJzjB8HoSMgGyudHOcsETnbllVeiehm83+ifY qpTA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author