Re: [PATCH 10/12] pretty: support padding placeholders, %< %> and %><
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 17, 2013, 09:03 UTC
- Message-ID
- <CAPig+cSdoPad=fuhNOp+ChXyh+c8fUD2ewxoaarQQRhJ19SjjA@mail.gmail.com>
- In-Reply-To
- <1363400683-14813-11-git-send-email-pclouds@gmail.com>
On Fri, Mar 15, 2013 at 10:24 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
> Either %<, %> or %<> standing before a placeholder specifies how many
s/%<>/%></
Show 13 quoted lines
> 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)