zsh-users
 help / color / mirror / code / Atom feed
* _brace_parameter: misleading help text for #
@ 2021-07-22 13:35 Leah Neukirchen
  2022-03-31  5:49 ` Lawrence Velázquez
  0 siblings, 1 reply; 7+ messages in thread
From: Leah Neukirchen @ 2021-07-22 13:35 UTC (permalink / raw)
  To: zsh-users

Hi,

echo ${(<TAB> shows
...
#  -- evaluate as numeric expression
...

zshexpn(1) says:
      #      Evaluate the resulting words as numeric expressions and output
             the characters corresponding to the resulting integer.

I think the help text is missing the crucial bit here:
output the characters corresponding to the resulting integer.

Perhaps
"#:evaluate as numeric expression and interpret as character codes"
or so would be a better description.

Thanks,
-- 
Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _brace_parameter: misleading help text for #
  2021-07-22 13:35 _brace_parameter: misleading help text for # Leah Neukirchen
@ 2022-03-31  5:49 ` Lawrence Velázquez
  2022-03-31  8:42   ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Lawrence Velázquez @ 2022-03-31  5:49 UTC (permalink / raw)
  To: Leah Neukirchen; +Cc: zsh-users

On Thu, Jul 22, 2021, at 9:35 AM, Leah Neukirchen wrote:
> echo ${(<TAB> shows
> ...
> #  -- evaluate as numeric expression
> ...
>
> zshexpn(1) says:
>       #      Evaluate the resulting words as numeric expressions and output
>              the characters corresponding to the resulting integer.
>
> I think the help text is missing the crucial bit here:
> output the characters corresponding to the resulting integer.
>
> Perhaps
> "#:evaluate as numeric expression and interpret as character codes"
> or so would be a better description.

Apologies, Leah.  This hasn't been addressed, as far as I can tell.

workers: Anyone want to take a stab at it?

-- 
vq


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _brace_parameter: misleading help text for #
  2022-03-31  5:49 ` Lawrence Velázquez
@ 2022-03-31  8:42   ` Peter Stephenson
  2022-03-31 12:16     ` Leah Neukirchen
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2022-03-31  8:42 UTC (permalink / raw)
  To: Leah Neukirchen, zsh-users

> On 31 March 2022 at 06:49 Lawrence Velázquez <larryv@zsh.org> wrote:
> 
> 
> On Thu, Jul 22, 2021, at 9:35 AM, Leah Neukirchen wrote:
> > echo ${(<TAB> shows
> > ...
> > #  -- evaluate as numeric expression
> > ...
> >
> > zshexpn(1) says:
> >       #      Evaluate the resulting words as numeric expressions and output
> >              the characters corresponding to the resulting integer.
> >
> > I think the help text is missing the crucial bit here:
> > output the characters corresponding to the resulting integer.
> >
> > Perhaps
> > "#:evaluate as numeric expression and interpret as character codes"
> > or so would be a better description.
> 
> Apologies, Leah.  This hasn't been addressed, as far as I can tell.
> 
> workers: Anyone want to take a stab at it?

Yes, that's a good idea --- I think this sort of thing has confused me
in the past.

I'm wondering if the use of the phrase "the resulting words" is clear.
It is explained at the top of parameter expansion, so I'm probably
worrying about nothing --- i.e. it's already explicit that something
like "32 65" is just one word unless you're in one of the cases where
the shell does splitting on it.  The phrase occurs repeatedly in this
area, so it would need explaining higher up if it wasn't clear.  But
I'll leave it alone unless anyway else thinks they're confused.

pws

diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 00cbbcd27..bbacc6ae4 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -968,9 +968,10 @@ following flags are supported:
 
 startitem()
 item(tt(#))(
-Evaluate the resulting words as numeric expressions and output the
-characters corresponding to the resulting integer.  Note that this form is
-entirely distinct from use of the tt(#) without parentheses.
+Evaluate the resulting words as numeric expressions and interpret
+these as character codes.  Output the corresponding characters.  Note
+that this form is entirely distinct from use of the tt(#) without
+parentheses.
 
 If the tt(MULTIBYTE) option is set and the number is greater than 127
 (i.e. not an ASCII character) it is treated as a Unicode character.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _brace_parameter: misleading help text for #
  2022-03-31  8:42   ` Peter Stephenson
@ 2022-03-31 12:16     ` Leah Neukirchen
  2022-03-31 19:26       ` Lawrence Velázquez
  0 siblings, 1 reply; 7+ messages in thread
From: Leah Neukirchen @ 2022-03-31 12:16 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

Peter Stephenson <p.w.stephenson@ntlworld.com> writes:

> -Evaluate the resulting words as numeric expressions and output the
> -characters corresponding to the resulting integer.  Note that this form is
> -entirely distinct from use of the tt(#) without parentheses.
> +Evaluate the resulting words as numeric expressions and interpret
> +these as character codes.  Output the corresponding characters.  Note
> +that this form is entirely distinct from use of the tt(#) without
> +parentheses.

This is way more clear indeed.

-- 
Leah Neukirchen  <leah@vuxu.org>  https://leahneukirchen.org


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _brace_parameter: misleading help text for #
  2022-03-31 12:16     ` Leah Neukirchen
@ 2022-03-31 19:26       ` Lawrence Velázquez
  2022-04-01  0:11         ` Matthew Martin
  0 siblings, 1 reply; 7+ messages in thread
From: Lawrence Velázquez @ 2022-03-31 19:26 UTC (permalink / raw)
  To: Leah Neukirchen, Peter Stephenson; +Cc: zsh-users

On Thu, Mar 31, 2022, at 8:16 AM, Leah Neukirchen wrote:
> Peter Stephenson <p.w.stephenson@ntlworld.com> writes:
>
>> -Evaluate the resulting words as numeric expressions and output the
>> -characters corresponding to the resulting integer.  Note that this form is
>> -entirely distinct from use of the tt(#) without parentheses.
>> +Evaluate the resulting words as numeric expressions and interpret
>> +these as character codes.  Output the corresponding characters.  Note
>> +that this form is entirely distinct from use of the tt(#) without
>> +parentheses.
>
> This is way more clear indeed.

I concur, but I think the original message suggested clarifying the
completion blurb as well.

-- 
vq


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _brace_parameter: misleading help text for #
  2022-03-31 19:26       ` Lawrence Velázquez
@ 2022-04-01  0:11         ` Matthew Martin
  2022-04-01  0:21           ` Lawrence Velázquez
  0 siblings, 1 reply; 7+ messages in thread
From: Matthew Martin @ 2022-04-01  0:11 UTC (permalink / raw)
  To: Lawrence Velázquez; +Cc: Leah Neukirchen, Peter Stephenson, zsh-users

On Thu, Mar 31, 2022 at 03:26:15PM -0400, Lawrence Velázquez wrote:
> On Thu, Mar 31, 2022, at 8:16 AM, Leah Neukirchen wrote:
> > Peter Stephenson <p.w.stephenson@ntlworld.com> writes:
> >
> >> -Evaluate the resulting words as numeric expressions and output the
> >> -characters corresponding to the resulting integer.  Note that this form is
> >> -entirely distinct from use of the tt(#) without parentheses.
> >> +Evaluate the resulting words as numeric expressions and interpret
> >> +these as character codes.  Output the corresponding characters.  Note
> >> +that this form is entirely distinct from use of the tt(#) without
> >> +parentheses.
> >
> > This is way more clear indeed.
> 
> I concur, but I think the original message suggested clarifying the
> completion blurb as well.

That was addressed in 49932.

Wasn't sure if I should resurrect an 8 month old thread.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _brace_parameter: misleading help text for #
  2022-04-01  0:11         ` Matthew Martin
@ 2022-04-01  0:21           ` Lawrence Velázquez
  0 siblings, 0 replies; 7+ messages in thread
From: Lawrence Velázquez @ 2022-04-01  0:21 UTC (permalink / raw)
  To: Matthew Martin; +Cc: Leah Neukirchen, Peter Stephenson, zsh-users

On Thu, Mar 31, 2022, at 8:11 PM, Matthew Martin wrote:
> On Thu, Mar 31, 2022 at 03:26:15PM -0400, Lawrence Velázquez wrote:
>> On Thu, Mar 31, 2022, at 8:16 AM, Leah Neukirchen wrote:
>> > Peter Stephenson <p.w.stephenson@ntlworld.com> writes:
>> >
>> >> -Evaluate the resulting words as numeric expressions and output the
>> >> -characters corresponding to the resulting integer.  Note that this form is
>> >> -entirely distinct from use of the tt(#) without parentheses.
>> >> +Evaluate the resulting words as numeric expressions and interpret
>> >> +these as character codes.  Output the corresponding characters.  Note
>> >> +that this form is entirely distinct from use of the tt(#) without
>> >> +parentheses.
>> >
>> > This is way more clear indeed.
>> 
>> I concur, but I think the original message suggested clarifying the
>> completion blurb as well.
>
> That was addressed in 49932.

Argh, I even saw that one before I started and totally didn't connect
the dots....  *deep shame*

-- 
vq


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-01  0:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 13:35 _brace_parameter: misleading help text for # Leah Neukirchen
2022-03-31  5:49 ` Lawrence Velázquez
2022-03-31  8:42   ` Peter Stephenson
2022-03-31 12:16     ` Leah Neukirchen
2022-03-31 19:26       ` Lawrence Velázquez
2022-04-01  0:11         ` Matthew Martin
2022-04-01  0:21           ` Lawrence Velázquez

Code repositories for project(s) associated with this 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).