about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-26 08:44:13 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-26 08:44:13 +0000
commite7f910471143cfa56cc902e41c759ae91326f909 (patch)
treef1e253599078dec2288708214608136ed0043f36
parentf90992ec3170a70a65d11ed9fd2aa4c6baaec3eb (diff)
downloadzsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.gz
zsh-e7f910471143cfa56cc902e41c759ae91326f909.tar.xz
zsh-e7f910471143cfa56cc902e41c759ae91326f909.zip
make `_arguments --' use specs after the `--' even for options not described in the help output to get arguments (12378)
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Base/_arguments9
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 562f3905a..cd46f86b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-07-26  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 12378: Completion/Base/_arguments: make `_arguments --' use
+ 	specs after the `--' even for options not described in the help
+ 	output to get arguments
+	
 	* users/3337: Completion/Base/_value: allow _value:<assoc> functions to
  	override completion for all keys of an assoc
 	
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index a5a39112a..4f33048e0 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -142,11 +142,16 @@ if (( long )); then
 	cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" )
       fi
 
-      # Everything else is just added as an option without arguments.
+      # Everything else is just added as an option without arguments or
+      # as described by $descr.
 
       if (( $#tmp )); then
         tmp=("${(@)tmp//[^a-zA-Z0-9-]}")
-	cache=( "$cache[@]" "$tmp[@]" )
+        if [[ -n "$descr" ]]; then
+	  cache=( "$cache[@]" "${(@)^tmp}${descr}" )
+        else
+	  cache=( "$cache[@]" "$tmp[@]" )
+        fi
       fi
     done
     set -A "$name" "${(@)cache:# #}"