Re: [PATCH] notes: remove trailing whitespace from editor template
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jun 2, 2025, 13:52 UTC
- Message-ID
- <21a5cbc3-3d0b-410b-80d0-94e6444f8080@gmail.com>
- In-Reply-To
- <xmqq5xhmvuol.fsf@gitster.g>
Hi Junio
On 27/05/2025 18:18, Junio C Hamano wrote:
Show 14 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 that - TIL. I agree with your interpretation that the original is in fact safe.
Thanks
Phillip