Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion with prefix which contains meta character.
- X-seq: zsh-workers 9260
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: completion with prefix which contains meta character.
- Date: Fri, 7 Jan 2000 10:27:05 +0100 (MET)
- In-reply-to: Tanaka Akira's message of 07 Jan 2000 08:38:28 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Tanaka Akira wrote:
> In article <200001061503.QAA19187@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
> Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
>
> > Yup. Since $PREFIX contains the quoted form, compset should use it, too.
>
> Now, `echo =<TAB>' completes nothing.
Ugh.
> ...
>
> Replacing the compset pattern \= with = works well, but they should
> have same bahaviour, I think.
I first wanted to agree, then had a closer look at the quoting in the
completion code again and now I'm not so sure again.
Currently the completion code quotes only characters that need to be
quoted. And it reports only such characters (in $PREFIX and friends)
in quoted form.
With respect to this, the behaviour of compset is now consistent.
So the question is: should we change compset or not -- making it
differ from the rest? Or should we just document the way the code
quotes in the manual?
Still, here is the patch for _main_complete, the state this leaves the
code in will stay valid independent of the answer for the questions
above.
Bye
Sven
diff -ru ../z.old/Completion/Core/_main_complete Completion/Core/_main_complete
--- ../z.old/Completion/Core/_main_complete Thu Jan 6 16:04:09 2000
+++ Completion/Core/_main_complete Fri Jan 7 10:21:23 2000
@@ -38,7 +38,7 @@
# Special completion contexts after `~' and `='.
-if compset -P 1 '\='; then
+if compset -P 1 '='; then
compstate[context]=equal
elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then
compset -p 1
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author