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

Re: [PATCH] notes: remove trailing whitespace from editor template

From
Eric Sunshine <sunshine@sunshineco.com>
Date
May 27, 2025, 17:28 UTC
Message-ID
<CAPig+cScZ_0g7K-pQrxSseFX+fqjA6KAFf3nSi5cxbbCHhR5zQ@mail.gmail.com>
In-Reply-To
<xmqq5xhmvuol.fsf@gitster.g>
On Tue, May 27, 2025 at 1:19 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> > Should that be " \$"? What you've got seems to work with dash but I'm
> > not sure if it is POSIX compliant or not.
>
> "2.6 Word Expansions" ends with this sentence:
>
>     If a '$' that is neither within single-quotes nor escaped by a
>     <backslash> is immediately followed by a <space>, <tab>, or a
>     <newline>, or is not followed by any character, the '$' shall be
>     treated as a literal character.
>
> Taken together with "2.2.3 Double-Quotes", I'd read it as blessing a
> lone '$' at the end of double-quoted string as a literal dollar sign.

Thanks for finding and posting this. I had read the POSIX shell language specification pretty closely when writing the lexer and parser for chainlint.pl and remembered the above statement, and had wanted to cite it after reading Phillip's initial reply but didn't manage to find it again in the limited time I had available for searching through the documentation.

Previous: Junio C HamanoNext: Kristoffer Haugsbakk
Message 8 of 17 in “notes: remove trailing whitespace from editor template”
  1. notes: remove trailing whitespace from editor templatekristofferhaugsbakk@fastmail.com, May 24, 2025
  2. Kristoffer HaugsbakkMay 25, 2025
  3. Phillip WoodMay 26, 2025
  4. Kristoffer HaugsbakkMay 26, 2025
  5. Phillip WoodMay 27, 2025
  6. Kristoffer HaugsbakkMay 27, 2025
  7. Junio C HamanoMay 27, 2025
  8. Eric SunshineMay 27, 2025
  9. Kristoffer HaugsbakkMay 27, 2025
  10. Junio C HamanoMay 27, 2025
  11. Phillip WoodJun 2, 2025
  12. D. Ben KnobleJun 3, 2025
  13. Eric SunshineJun 3, 2025
  14. Kristoffer HaugsbakkJun 9, 2025
  15. Kristoffer HaugsbakkJun 9, 2025
  16. D. Ben KnobleJun 10, 2025
  17. Junio C HamanoJun 10, 2025

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.