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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio

On 27/05/2025 18:18, Junio C Hamano wrote:
Phillip Wood <phillip.wood123@xxxxxxxxx> 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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux