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

Re: [RFD] Expanded Pretty Format Placeholders Proposal

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2011, 21:35 UTC
Message-ID
<7vvczh1lco.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1300395454.2004.9.camel@walleee>
Will Palmer <wmpalmer@gmail.com> writes:
Show 12 quoted lines
> On Fri, 2011-03-11 at 00:47 +0000, Will Palmer wrote:
> ...
>> 	%(foo-condition: %(format: %H, aka %h), %H )
>
> of course, this conflicts with the need to embed a literal ")" within a
> sub-format. The simplest option for this would be to either allow %) as
> an escape, as with %%. Even simpler, of course, would be %x29, but this
> seems needlessly obscure. The only objection I have to %) is "It's
> ugly". To me, %(format: "this is a paren: )") is easier to read, but
> that would just be moving the problem around, adding the necessity of
> the just-as-ugly-or-moreso %", or alternatively C-style \" and \\.
> So I think that %) will be the best option.

I somehow had an impression that you will be using "" to quote strings to protect leading or trailing whitespaces, and if you were to support double quotes anyway, \" and \\ become a very natural thing to do (so does your "close parenthesis inside dq").

Previous: Will PalmerNext: Will Palmer
Message 3 of 5 in “[RFD] Expanded Pretty Format Placeholders Proposal”
  1. Will PalmerMar 11, 2011
  2. Will PalmerMar 17, 2011
  3. Junio C HamanoMar 17, 2011
  4. Will PalmerMar 17, 2011
  5. Junio C HamanoMar 18, 2011

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.