summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/_arguments2
-rw-r--r--Completion/Core/_complete13
2 files changed, 13 insertions, 2 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 5a8da45ab..68a7ba848 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -78,7 +78,7 @@ if (( long )); then
 
       # Using (( ... )) gives a parse error.
 
-      let "$tmpargv[(I)(|\([^\)]#\))${opt}(|[-+=])(|\[*\])(|:*)]" ||
+      let "$tmpargv[(I)(|\([^\)]#\))(|\*)${opt}(|[-+=])(|\[*\])(|:*)]" ||
           tmp=( "$tmp[@]" "$opt" )
     done
     lopts=( "$tmp[@]" )
diff --git a/Completion/Core/_complete b/Completion/Core/_complete
index 2441771bc..809df1fa9 100644
--- a/Completion/Core/_complete
+++ b/Completion/Core/_complete
@@ -13,11 +13,22 @@ oldcontext="$curcontext"
 
 if [[ -n "$compcontext" ]]; then
 
-  if [[ "${(t)compcontext}" = *(array|assoc)* ]]; then
+  if [[ "${(t)compcontext}" = *array* ]]; then
     local expl
 
     _wanted values expl value compadd -a - compcontext
 
+  elif [[ "${(t)compcontext}" = *assoc* ]]; then
+    local expl tmp i
+
+    tmp=()
+    for i in "${(@k)compcontext[(R)*[^[:blank:]]]}"; do
+      tmp=( "$tmp[@]" "${i}:${compcontext[$i]}" )
+    done
+    tmp=( "$tmp[@]" "${(k@)compcontext[(R)[[:blank:]]#]}" )
+
+    _describe -t values value tmp
+
   elif [[ "$compcontext" = *:*:* ]]; then
     local tag="${${compcontext%%:*}:-values}"
     local descr="${${${compcontext#${tag}:}%%:*}:-value}"