* Re: pws-20 parameter completion can't handle new syntax
@ 1999-06-01 10:39 Sven Wischnowsky
0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-06-01 10:39 UTC (permalink / raw)
To: zsh-workers
Bart Schaefer wrote:
> On Jun 1, 11:30am, Sven Wischnowsky wrote:
> } Subject: Re: pws-20 parameter completion can't handle new syntax
> }
> } > 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.
>
> I think I'd prefer this particular "fix" were left out. We're more
> likely to notice that `${"foo' still needs fixing than we are to remember
> to un-fix `${ foo'.
I don't see a better solution without also dealing with the other
quoting-trouble and I have both of them together in my todo-list, so
no need to fear...
> Hmm, perhaps it's time to actually set up a bug tracking system for zsh.
Yes, maybe.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pws-20 parameter completion can't handle new syntax
1999-06-01 9:30 Sven Wischnowsky
@ 1999-06-01 10:04 ` Bart Schaefer
0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1999-06-01 10:04 UTC (permalink / raw)
To: zsh-workers
On Jun 1, 11:30am, Sven Wischnowsky wrote:
} Subject: Re: pws-20 parameter completion can't handle new syntax
}
} > 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.
I think I'd prefer this particular "fix" were left out. We're more
likely to notice that `${"foo' still needs fixing than we are to remember
to un-fix `${ foo'.
Hmm, perhaps it's time to actually set up a bug tracking system for zsh.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: pws-20 parameter completion can't handle new syntax
@ 1999-06-01 9:30 Sven Wischnowsky
1999-06-01 10:04 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 1999-06-01 9:30 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* pws-20 parameter completion can't handle new syntax
@ 1999-06-01 0:00 Bart Schaefer
0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 1999-06-01 0:00 UTC (permalink / raw)
To: zsh-workers
Not surprisingly, this doesn't work (with new-style completion stuff loaded):
zagzig% echo ${"comp<TAB>
<BEEP>
Just to show that the syntax is valid:
zagzig% echo ${"compconfig"}
2n _complete ./Completion/Core/compinit.dump correct to:
(This works because of PWS's INULL change in subst.c; it used to error with
`closing brace expected').
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".
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-06-01 10:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-01 10:39 pws-20 parameter completion can't handle new syntax Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-06-01 9:30 Sven Wischnowsky
1999-06-01 10:04 ` Bart Schaefer
1999-06-01 0:00 Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).