From ba168b43dab3102891839a997ef6a2878c2738e5 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 21 May 2002 07:44:57 +0000 Subject: fix removal of automatically added specs (from the -- option) for which a user-defined one is present (17191) --- Completion/Base/Utility/_arguments | 4 ++-- Completion/Unix/Command/_rsync | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Completion') diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments index 0cfc60b54..b60e76342 100644 --- a/Completion/Base/Utility/_arguments +++ b/Completion/Base/Utility/_arguments @@ -74,11 +74,11 @@ if (( long )); then # Remove options also described by user-defined specs. tmp=() - for opt in "${(@)lopts:#--}"; do + for opt in "${(@)${(@)lopts:#--}%%\=*}"; do # Using (( ... )) gives a parse error. - let "$tmpargv[(I)(|\([^\)]#\))(|\*)${opt}(|[-+=])(|\[*\])(|:*)]" || + let "$tmpargv[(I)(|\([^\)]#\))(|\*)${opt}(|[-+]|=(|-))(|\[*\])(|:*)]" || tmp=( "$tmp[@]" "$opt" ) done lopts=( "$tmp[@]" ) diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync index d111b38ba..8120c10a9 100644 --- a/Completion/Unix/Command/_rsync +++ b/Completion/Unix/Command/_rsync @@ -121,7 +121,7 @@ _arguments -C -s \ '(--whole-file)-W[copy whole files]' \ '(-W)--whole-file[copy whole files]' \ '(--one-file-system)-x[do not cross filesystem boundaries]' \ - '(-x)-one-file-system[do not cross filesystem boundaries]' \ + '(-x)--one-file-system[do not cross filesystem boundaries]' \ '(--block-size)-B[checksum blocking size]:block size:' \ '(-B)--block-size=[checksum blocking size]:block size:' \ '(--rsh)-e[rsh command]:remote command:(rsh ssh)' \ -- cgit 1.4.1