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

Re: _values does not quote inserted matches



Bart Schaefer wrote:

> On Apr 14, 12:38am, Borsenkow Andrej wrote:
> } Subject: _values does not quote inserted matches
> }
> } note, that match inserted into command line is not quoted that makes it
> } impossible to complete more than one value.
> 
> The problem is this stuff at lines 54-58 of _values:
> 
>       if [[ ${#noargs}+${#args}+${#opts} -ne 1 ]] && compvalues -s sep; then
>         sep=( "-qQS" "$sep" )
>       else
>         sep=()
>       fi
> 
> I don't know why the Q is included on line 55?  It seems to all work OK if
> I take it out.

Same for me. And I couldn't find when we added this, so it's probably
very old, from a time when _values was less sophisticated about
separators with special characters or something.

So, let's try.


Bye
  Sven

Index: Completion/Base/Utility/_values
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Utility/_values,v
retrieving revision 1.7
diff -u -r1.7 _values
--- Completion/Base/Utility/_values	22 Jan 2002 10:22:48 -0000	1.7
+++ Completion/Base/Utility/_values	16 Apr 2002 07:54:35 -0000
@@ -51,7 +51,7 @@
     else
       compvalues -d descr
       if [[ ${#noargs}+${#args}+${#opts} -ne 1 ]] && compvalues -s sep; then
-        sep=( "-qQS" "$sep" )
+        sep=( "-qS" "$sep" )
       else
         sep=()
       fi

-- 
Sven Wischnowsky                          wischnow@xxxxxxxxx



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