about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2009-04-18 07:26:56 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2009-04-18 07:26:56 +0000
commit1f09b2909dd21ecb58a67125f340466da50e92b0 (patch)
tree2b62684a070c974310391de1bbca947bdaabe0ae
parent3fea34321b79031c2030f6429a54ad219af54e03 (diff)
downloadzsh-1f09b2909dd21ecb58a67125f340466da50e92b0.tar.gz
zsh-1f09b2909dd21ecb58a67125f340466da50e92b0.tar.xz
zsh-1f09b2909dd21ecb58a67125f340466da50e92b0.zip
users/14033 as modified by users/14037 and added doc: allow colon quoting
in matches in _describe
-rw-r--r--ChangeLog8
-rw-r--r--Completion/Base/Utility/_describe4
-rw-r--r--Doc/Zsh/compsys.yo3
3 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 57ef61510..ad115dcde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-18  Andrey Borzenkov <bor@zsh.org>
+
+	* users/14033 as modified by users/14037 and added doc:
+	Completion/Base/Utility/_describe, Doc/Zsh/compsys.yo: allow
+	quoting of ":" with backslashes in possible matches in _describe
+
 2009-04-17  Peter Stephenson  <pws@csr.com>
 
 	* users/14041: Doc/Zsh/zle.yo, Src/Zle/zle_bindings.c: bind ":"
@@ -11567,5 +11573,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4655 $
+* $Revision: 1.4656 $
 *****************************************************
diff --git a/Completion/Base/Utility/_describe b/Completion/Base/Utility/_describe
index d5d7aeba7..f899b0ad0 100644
--- a/Completion/Base/Utility/_describe
+++ b/Completion/Base/Utility/_describe
@@ -97,10 +97,10 @@ while _tags; do
     
         if [[ -n $_mats ]]; then
           compadd "$_opts[@]" "${(@)_expl:/-J/-2V}" -D $_strs - \
-                  "${(@M)${(@P)_mats}##([^:\\]|\\?)##}"
+                  "${(@)${(@M)${(@P)_mats}##([^:\\]|\\?)##}//\\(#b)(?)/$match[1]}"
         else
           compadd "$_opts[@]" "${(@)_expl:/-J/-2V}" -D $_strs - \
-                  "${(@M)${(@P)_strs}##([^:\\]|\\?)##}"
+                  "${(@)${(@M)${(@P)_strs}##([^:\\]|\\?)##}//\\(#b)(?)/$match[1]}"
         fi
       done
       set - "$_argv[@]"
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index f7e47b1e1..e4272b654 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4016,7 +4016,8 @@ The var(descr) is taken as a string to display above the matches if the
 tt(format) style for the tt(descriptions) tag is set.  This is followed by
 one or two names of arrays followed by options to pass to tt(compadd).  The
 first array contains the possible completions with their descriptions in
-the form `var(completion)tt(:)var(description)'.  If a second array is
+the form `var(completion)tt(:)var(description)'.  Any literal colons in
+var(completion) must be quoted with a backslash.  If a second array is
 given, it should have the same number of elements as the first; in this
 case the corresponding elements are added as possible completions instead
 of the var(completion) strings from the first array.  The completion list