about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Completer/_all_matches8
-rw-r--r--Doc/Zsh/compsys.yo5
3 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index db363f268..bc9efef7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-04  Oliver Kiddle  <opk@zsh.org>
+
+	* 16923: Completion/Base/Completer/_all_matches, Doc/Zsh/compsys.yo:
+	add insert style to insert all matches instead of adding as a match
+
 2002-03-30  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* 16927: zsh/Functions/Misc/zmv: Added -W to auto-convert wildcards in
diff --git a/Completion/Base/Completer/_all_matches b/Completion/Base/Completer/_all_matches
index f33d78040..59a6d8060 100644
--- a/Completion/Base/Completer/_all_matches
+++ b/Completion/Base/Completer/_all_matches
@@ -33,8 +33,12 @@ _all_matches_end() {
   if [[ "$compstate[nmatches]" -gt 1 && $not[(I)(|_)$_completer] -eq 0 ]]; then
     local expl
 
-    _description all-matches expl 'all matches'
-    compadd "$expl[@]" -C
+    if zstyle -t "$_all_matches_context" insert; then
+      compstate[insert]=all
+    else
+      _description all-matches expl 'all matches'
+      compadd "$expl[@]" -C
+    fi
   fi
 
   unset _all_matches_context
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 8651c67d8..30b501b2d 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1461,6 +1461,11 @@ Note that during the execution of completion functions, the
 tt(EXTENDED_GLOB) option is in effect, so the characters `tt(#)',
 `tt(~)' and `tt(^)' have special meanings in the patterns.
 )
+kindex(insert, completion style)
+item(tt(insert))(
+This style is used by the tt(_all_matches) completer to decide whether to
+insert the list of all matches instead of adding it as another match.
+)
 kindex(insert-ids, completion style)
 item(tt(insert-ids))(
 When completing process IDs, for example as arguments to the tt(kill) and