Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: quoting colons



Two places where we should check if the colon is quoted, otherwise an
_arguments spec like `-foo\:-[...]:..:(...)' yielded a description of `-1'.


Bye
 Sven

Index: Completion/Core/_all_labels
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_all_labels,v
retrieving revision 1.5
diff -u -r1.5 _all_labels
--- Completion/Core/_all_labels	2000/05/31 09:38:26	1.5
+++ Completion/Core/_all_labels	2001/03/23 10:35:15
@@ -27,7 +27,7 @@
 
 while comptags "-A$__prev" "$1" curtag __spec; do
   _comp_tags="$_comp_tags $__spec "
-  if [[ "$curtag" = *:* ]]; then
+  if [[ "$curtag" = *[^\\]:* ]]; then
     zformat -f __descr "${curtag#*:}" "d:$3"
     _description "$__gopt" "${curtag%:*}" "$2" "$__descr"
     curtag="${curtag%:*}"
Index: Completion/Core/_next_label
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_next_label,v
retrieving revision 1.5
diff -u -r1.5 _next_label
--- Completion/Core/_next_label	2000/05/31 09:38:26	1.5
+++ Completion/Core/_next_label	2001/03/23 10:35:15
@@ -9,7 +9,7 @@
 
 if comptags -A "$1" curtag __spec; then
   _comp_tags="$_comp_tags $__spec "
-  if [[ "$curtag" = *:* ]]; then
+  if [[ "$curtag" = *[^\\]:* ]]; then
     zformat -f __descr "${curtag#*:}" "d:$3"
     _description "$__gopt" "${curtag%:*}" "$2" "$__descr"
     curtag="${curtag%:*}"

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author