Thread (64 messages) 64 messages, 5 authors, 2016-06-15

Re: [PATCH 12/12] pretty: support %>> that steal trailing spaces

From: Eric Sunshine <hidden>
Date: 2016-06-15 22:56:25

On Fri, Mar 15, 2013 at 10:24 PM, Nguyễn Thái Ngọc Duy
[off-list ref] wrote:
This is pretty useful in `%<(100)%s%Cred%>(20)% an' where %s does not
s/% an/%an/
quoted hunk ↗ jump to hunk
use up all 100 columns and %an needs more than 20 columns. By
replacing %>(20) with %>>(20), %an can steal spaces from %s.
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 17f82f4..036c14a 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -170,7 +170,10 @@ The placeholders are:
   columns, padding spaces on the right if necessary
 - '%>(<N>)', '%>|(<N>)': similar to '%<(<N<)', '%<|(<N<)'
   respectively, but padding spaces on the left
-- '%><(<N>)', '%><|(<N>)': similar to '%<(<N<)', '%<|(<N<)'
+- '%>>(<N>)', '%>>|(<N>)': similar to '%>(<N<)', '%>|(<N<)'
s/<N</<N>/g
+  respectively, except that if the next placeholder takes more spaces
+  than given and there are spaces on its left, use those spaces
+- '%><(<N>)', '%><|(<N>)': similar to '% <(<N<)', '%<|(<N<)'
Ditto: s/<N</<N>/g
   respectively, but padding both sides (i.e. the text is centered)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help