about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-14 08:34:27 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-14 08:34:27 +0000
commit0e20ad9aa0989caf2a488c8590f22beeba24c9b0 (patch)
tree1695fa6a06263648257171ec4bbdfe24a7309d6b /Completion
parent5be1908b56232b3f1236dc6ea75b170ae2826c7a (diff)
downloadzsh-0e20ad9aa0989caf2a488c8590f22beeba24c9b0.tar.gz
zsh-0e20ad9aa0989caf2a488c8590f22beeba24c9b0.tar.xz
zsh-0e20ad9aa0989caf2a488c8590f22beeba24c9b0.zip
zsh-workers/7819
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/_arguments12
1 files changed, 10 insertions, 2 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 808bfc2ab..1e1787b19 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -8,7 +8,7 @@ setopt localoptions extendedglob
 local args rest ws cur nth def nm expl descr action opt arg tmp xor
 local single uns ret=1 aret soptseq soptseq1 sopts prefix _line odescr
 local beg optbeg argbeg nargbeg inopt inrest fromrest cmd="$words[1]"
-local matched curopt noargs
+local matched curopt noargs i
 
 # Associative arrays used to collect information about the options.
 
@@ -433,7 +433,9 @@ while [[ cur -gt 0 ]]; do
 	if (( $+opts[$tmp] )); then
 	  def="$opts[$tmp]"
           curopt="$tmp"
-          _options[$curopt]=''
+	  for i in ${(s::)ws[1][2,-1]}; do
+            _options[${ws[1][1]}$i]=''
+	  done
 	  optbeg="$beg"
 	  argbeg="$beg"
           inopt=yes
@@ -646,6 +648,9 @@ if [[ -z "$def" || "$def" = :* ]]; then
         def="$dopts[$tmp[1]]"
 	opt=''
 	uns="${prefix[2,-1]%%${tmp[1][2]}*}${tmp[1][2]}"
+	for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
+	  _options[${prefix[1]}$i]=''
+	done
 	break
       elif compset -P "$tmp[1]"; then
 
@@ -667,6 +672,9 @@ if [[ -z "$def" || "$def" = :* ]]; then
         def="$odopts[$tmp[1]]"
 	opt=''
 	uns="${prefix[2,-1]%%${tmp[1][2]}*}${tmp[1][2]}"
+	for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
+	  _options[${prefix[1]}$i]=''
+	done
 	break
       elif compset -P "$tmp[1]"; then
 	def="$odopts[$tmp[1]]"