Re: [PATCH 3/2] pretty: support right alignment

2012-09-24 Thread Jeff King
On Sun, Sep 23, 2012 at 01:17:43AM -0700, Junio C Hamano wrote: > Nguyen Thai Ngoc Duy writes: > > > ... On the other hand, I don't > > really wish to turn pretty format machinery into a full feature text > > layout engine (by ripping of links/lynx?). > > That is very true. We should restrain

Re: [PATCH 3/2] pretty: support right alignment

2012-09-23 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > ... On the other hand, I don't > really wish to turn pretty format machinery into a full feature text > layout engine (by ripping of links/lynx?). That is very true. We should restrain ourselves and avoid going overboard piling shiny new toys on a not-so-useful fo

Re: [PATCH 3/2] pretty: support right alignment

2012-09-21 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: >> - How does this interact with the wrapped output? Should it? > > We have to deal with it anyway when the left aligned text takes all > the space. On one hand, I don't want to break the terminal width, > leading to ugly output, so it'll interact. On the other hand

Re: [PATCH 3/2] pretty: support right alignment

2012-09-21 Thread Nguyen Thai Ngoc Duy
On Thu, Sep 20, 2012 at 09:40:49AM -0700, Junio C Hamano wrote: > - I am wondering if somebody ever want to do this with a follow-up >patch: > > Left %h%|Center %cd%|Right %ad > >Is %| a sensible choice for "flush right"? I am wondering if it >makes more sense to make %|, %< a

Re: [PATCH 3/2] pretty: support right alignment

2012-09-21 Thread Nguyen Thai Ngoc Duy
On Thu, Sep 20, 2012 at 11:40 PM, Junio C Hamano wrote: > I think this is a great feature at the conceptual level, and you > know "but" is coming ;-). I'm still not sure if it's useful beyond my simple example. For example, will it be useful in multiline log format, not just --oneline? > - Shou

Re: [PATCH 3/2] pretty: support right alignment

2012-09-20 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > And this is a for-fun patch that adds %| to right align everything > after that. I'm ignoring problems with line wrapping, i18n and so > on. "%C+%h %s%|%d" looks quite nice. I'm not sure how much useful it > is beyond --oneline though. It looks something like this >

Re: [PATCH 3/2] pretty: support right alignment

2012-09-20 Thread Nguyen Thai Ngoc Duy
And this is a for-fun patch that adds %| to right align everything after that. I'm ignoring problems with line wrapping, i18n and so on. "%C+%h %s%|%d" looks quite nice. I'm not sure how much useful it is beyond --oneline though. It looks something like this cc543b2 pretty: support placeholders %C