From: Phillip Wood Date: Mon, 02 Jun 2025 13:52:37 GMT Subject: Re: [PATCH] notes: remove trailing whitespace from editor template Message-ID: <21a5cbc3-3d0b-410b-80d0-94e6444f8080@gmail.com> In-Reply-To: Hi Junio On 27/05/2025 18:18, Junio C Hamano wrote: > Phillip Wood 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 > is immediately followed by a , , or a > , 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