Re: [RFC PATCH] quote: make sq_quote_buf_pretty() prettier
- From
- Nahid hasan Sagor <nahidhasan141400@gmail.com>
- Date
- Nov 27, 2026, 18:25 UTC
- Message-ID
- <CABQNq+mnfJKohF5F4aQZ8APZk1bvOKo0F6e4FPrMuBvG1CpanA@mail.gmail.com>
- In-Reply-To
- <ee7de58093c69fbbab686a68b5b781bc60d90a2b.1795798429.git.phillip.wood@dunelm.org.uk>
Show 5 quoted lines
> + /* '~' is only special if it is the first character */
> + if (*p == '~') {
> + quote_it = true;
> + p++;
> }I may be misreading, but I think a leading '~' gets lost after the 'p++', so it never gets copied by strbuf_add(dst, p, q - p) later. That would make "~foo" come out as "'foo'".