git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] shell: local x=$1 may need to quote the RHS

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2022, 00:17 UTC
Message-ID
<xmqqlez2nibl.fsf@gitster.g>
In-Reply-To
<YfHCoR2VSad95Cpu@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 18 quoted lines
> On Tue, Jan 25, 2022 at 09:53:25PM -0800, Junio C Hamano wrote:
>> Taylor Blau <me@ttaylorr.com> writes:
>> >
>> >> The manual page for recent dash may need an update.
>> >> Can you perhaps file a bug on their documentation?
>> >
>> > Yes, I agree that dash.1 is out-of-date after cbb71a8. Konstantin:
>> > please feel free to use any of this if it's helpful to you in creating a
>> > bug report for the dash folks.
>>
>> I doubt that we can write off dash v0.5.10 as too old to matter, as
>> the tagger date seems to be mid 2020 at
>>
>> https://kernel.googlesource.com/pub/scm/utils/dash/dash/+/refs/tags/v0.5.11
>
> That isn't quite what I was implying. What I meant to say was that the
> dash _manual page_ is out-of-date w.r.t. the dash patch I linked, not
> that that version is something we could ignore.

Oh, I didn't mean it that way. I was continuing from your findings that certain features of "local" may not have been available in 0.5.10; hence the hits from grep that showed any assignment might be problematic with that version and we may need to downgrade our scripts.

But as Szeder writes in a response later in the thread, assignment on "local" may have been avaiable in versions before 0.5.11 in a limited form (namely, it is split at $IFS unlike normal assignments, which was the starting point of this thread), which reduces the scope of downgrading necessary by a large margin ;-)

Previous: Taylor Blau
Message 9 of 9 in “[RFC] shell: local x=$1 may need to quote the RHS”
  1. Junio C HamanoJan 24, 2022
  2. Konstantin KhomoutovJan 25, 2022
  3. Junio C HamanoJan 25, 2022
  4. Taylor BlauJan 25, 2022
  5. Junio C HamanoJan 26, 2022
  6. Konstantin KhomoutovJan 26, 2022
  7. SZEDER GáborJan 26, 2022
  8. Taylor BlauJan 26, 2022
  9. Junio C HamanoJan 27, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.