Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pws-20 parameter completion can't handle new syntax
- X-seq: zsh-workers 6414
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: pws-20 parameter completion can't handle new syntax
- Date: Tue, 1 Jun 1999 11:30:04 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Tue, 1 Jun 1999 00:00:06 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> Not surprisingly, this doesn't work (with new-style completion stuff loaded):
>
> zagzig% echo ${"comp<TAB>
> <BEEP>
Hm, yes. The patch below makes this work, but it also makes `${ comp<TAB>'
work, because check_param() gets the string in a form where the quote
is replaced by a space.
A better solution may follow once we come to the other completion-in-quotes
problems.
> Here's another, probably unrelated, unexpected behavior:
>
> zagzig% echo ${comp
> ^place cursor on "c" and press TAB
> zagzig% echo ${comp}
> ^cursor is now here, but there is no parameter
> named "comp".
Ahem, there was such a parameter because _parameters also tried to
complete local parameters as a fall-back. That was simply wrong.
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Tue Jun 1 11:28:34 1999
+++ Src/Zle/zle_tricky.c Tue Jun 1 11:22:35 1999
@@ -710,7 +710,7 @@
*b != '=' && *b != Equals &&
*b != '~' && *b != Tilde)
break;
- if (*b == '#' || *b == Pound || *b == '+')
+ if (*b == '#' || *b == Pound || *b == '+' || *b == ' ')
b++;
e = b;
diff -u oc/Core/_parameters Completion/Core/_parameters
--- oc/Core/_parameters Tue Jun 1 11:28:18 1999
+++ Completion/Core/_parameters Tue Jun 1 11:21:21 1999
@@ -4,5 +4,4 @@
# extra options of compadd. It first tries to complete only non-local
# parameters. All arguments are given to compadd.
-compadd "$@" - "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }" ||
- compadd "$@" - "${(@)${(@)${(@f)$(typeset)}%%\=*}##* }"
+compadd "$@" - "${(@)${(@)${(@)${(@f)$(typeset)}:#*local *\=*}%%\=*}##* }"
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author