Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: [PATCH] pretty-format: add append line-feed format specifier

From: Jeff King <hidden>
Date: 2016-06-15 23:02:28

Possibly related (same subject, not in this thread)

On Tue, Sep 09, 2014 at 11:17:20PM +0100, Harry Jeffery wrote:
I definitely prefer your more general solution to my
bare-minimum-to-scratch-itch patch. I'd certainly be willing to take your
patch and expand upon it (pun unintended) once Junio has weighed in on your
suggestions.
Thanks. I am always happy to see contributors willing to pick up and run
with ideas.

It is probably out-of-scope for what you want, but while we are talking
about %d, it may be worth considering whether there is something simple
we can do to make formatting list-like items more flexible. E.g., even
with "%D", you are stuck with the format "foo, bar, baz" for multiple
decorations. Some kind of "%join(%d,; )" might work to produce "foo;
bar; baz" (or whatever you want). But that may also be crossing the line
into insanity, and we would be better to allow some Turing-complete
embedded language like lua. For that matter, conditionals might be
crossing that insanity line, too.
Regardless of what happens with the conditional expansion I think it would
definitely be a useful addition to be able to print the decorators without
the " (...)" wrapper. I think it's general enough that it'd warrant its own
separate patch rather than being part of a patch series for the conditional
expansion.
Yeah, I agree it can be separate.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help