Re: [PATCH 10/12] pretty: support padding placeholders, %< %> and %><
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:
Either %<, %> or %<> standing before a placeholder specifies how many
s/%<>/%></
quoted hunk ↗ jump to hunk
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 8734224..87ca2c4 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt@@ -162,6 +162,14 @@ The placeholders are: - '%x00': print a byte from a hex code - '%w([<w>[,<i1>[,<i2>]]])': switch line wrapping, like the -w option of linkgit:git-shortlog[1]. +- '%<(<N>)': make the next placeholder take at least N columns, + padding spaces on the right if necessary +- '%<|(<N>)': make the next placeholder take at least until Nth + columns, padding spaces on the right if necessary +- '%>(<N>)', '%>|(<N>)': similar to '%<(<N<)', '%<|(<N<)'
s/<N</<N>/g
+ respectively, but padding spaces on the left +- '%><(<N>)', '%><|(<N>)': similar to '%<(<N<)', '%<|(<N<)'
Ditto: s/<N</<N>/g
+ respectively, but padding both sides (i.e. the text is centered)