* Prompt percent completion for truncations
@ 2022-03-21 18:32 Bart Schaefer
2022-03-21 21:15 ` Mikael Magnusson
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2022-03-21 18:32 UTC (permalink / raw)
To: Zsh hackers list
This is cute but unhelpful:
[ -- truncation from who knows where
Furthermore, completion after that doesn't work right:
% PS2=%[
parameter
(list of parameter names elided)
% PS2=%\[
(literally nothing: no suggestions, no beep)
If we're going to include %[ in the completions, it should continue
with %[< or %[> ... but my vote would be to just remove that because
it's a deprecated form of %< and %> respectively. There is also this:
% PS2=%\<
replacement string
% PS2=%\[\<
number
The latter is wrong, of course; both of these should behave the same.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Prompt percent completion for truncations
2022-03-21 18:32 Prompt percent completion for truncations Bart Schaefer
@ 2022-03-21 21:15 ` Mikael Magnusson
2022-03-21 21:42 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2022-03-21 21:15 UTC (permalink / raw)
To: Bart Schaefer; +Cc: Zsh hackers list
On 3/21/22, Bart Schaefer <schaefer@brasslantern.com> wrote:
> This is cute but unhelpful:
>
> [ -- truncation from who knows where
>
> Furthermore, completion after that doesn't work right:
>
> % PS2=%[
> parameter
> (list of parameter names elided)
> % PS2=%\[
> (literally nothing: no suggestions, no beep)
>
> If we're going to include %[ in the completions, it should continue
> with %[< or %[> ... but my vote would be to just remove that because
> it's a deprecated form of %< and %> respectively.
I have a feeling this is my fault, but I think the statute of
limitations has expired for this particular crime. (zw/30466)
I'm pretty sure I was unaware of the intricacies of $comp_state[quote]
back then, and did most of my testing inside single quotes.
> There is also this:
> % PS2=%\<
> replacement string
> % PS2=%\[\<
> number
>
> The latter is wrong, of course; both of these should behave the same.
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Prompt percent completion for truncations
2022-03-21 21:15 ` Mikael Magnusson
@ 2022-03-21 21:42 ` Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2022-03-21 21:42 UTC (permalink / raw)
To: Mikael Magnusson; +Cc: Zsh hackers list
On Mon, Mar 21, 2022 at 2:16 PM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> I have a feeling this is my fault, but I think the statute of
> limitations has expired for this particular crime.
Hah! Yes.
> I'm pretty sure I was unaware of the intricacies of $comp_state[quote]
> back then, and did most of my testing inside single quotes.
The quoting actually doesn't matter, same thing happens with
backslash, single, or double quotes.
> > There is also this:
> > % PS2=%\<
> > replacement string
> > % PS2=%\[\<
> > number
That seems to be coming from
_message -e ternary-prompt-expression number
which I think arises from treating as a ternary anything that doesn't
match the preceding list of specs, but I'm not certain.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-21 22:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 18:32 Prompt percent completion for truncations Bart Schaefer
2022-03-21 21:15 ` Mikael Magnusson
2022-03-21 21:42 ` 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).