git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Advanced --oneline layout
@ 2012-09-22  4:22 Nguyễn Thái Ngọc Duy
  2012-09-22  4:22 ` [PATCH 1/6] pretty: share code between format_decoration and show_decorations Nguyễn Thái Ngọc Duy
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2012-09-22  4:22 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

Still a toy series (previous discussion [1]) but it's getting close to
something useful.

This introduces three placeholders %<, %> and %<> for
left/right/center align the next placeholder. Any of them can be
followed by '|' to make the next placeholder use up to the Nth column.

It's pretty useful already. You should be able to do multi column
layout on your wiiide terminal. It might even be useful in multi-line
printouts (e.g. we can relayout the commit header)

There are a few things we can improve:

 - utf8-only support does not sound nice (even though I'm
   perfectly happy with it). At some point I think it'll be easier for
   us to declare all internal strings be in utf8 (or ascii in certain
   places), input/output routines are supposed to do the conversion.
   GNOME has gone this way since 2.0.
 - ellipsis to prevent too long text breaking layout
 - specifing "30% of my screen width" would be nice, but it could get
   complicated if users start to demand "30% width, but no less than 30
   columns and no more than 100 columns, and if blah blah"

[1] http://thread.gmane.org/gmane.comp.version-control.git/205922/focus=206049

Nguyễn Thái Ngọc Duy (6):
  pretty: share code between format_decoration and show_decorations
  pretty: split parsing %C into a separate function
  pretty: support %C(auto[,N]) to turn on coloring on next
    placeholder(s)
  utf8.c: move display_mode_esc_sequence_len() for use by other
    functions
  utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences
  pretty: support padding placeholders, %< %> and %<>

 Documentation/pretty-formats.txt |   5 +
 log-tree.c                       |  59 ++++++-----
 log-tree.h                       |   3 +
 pretty.c                         | 211 +++++++++++++++++++++++++++++++--------
 t/t4207-log-decoration-colors.sh |   8 +-
 utf8.c                           |  48 +++++----
 utf8.h                           |   1 +
 7 files changed, 244 insertions(+), 91 deletions(-)

-- 
1.7.12.1.384.g7b808e7

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-10-24  8:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-22  4:22 [PATCH 0/6] Advanced --oneline layout Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 1/6] pretty: share code between format_decoration and show_decorations Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 2/6] pretty: split parsing %C into a separate function Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 3/6] pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s) Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 4/6] utf8.c: move display_mode_esc_sequence_len() for use by other functions Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 5/6] utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences Nguyễn Thái Ngọc Duy
2012-09-22  4:22 ` [PATCH 6/6] pretty: support padding placeholders, %< %> and %<> Nguyễn Thái Ngọc Duy
2012-09-22  4:26 ` [PATCH 7/6] pretty: trim trailing spaces due to padding Nguyễn Thái Ngọc Duy
2012-09-23  9:10 ` [PATCH v2 0/9] Advanced --oneline layout Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 1/9] pretty: share code between format_decoration and show_decorations Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 2/9] pretty: split parsing %C into a separate function Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 3/9] pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s) Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 4/9] utf8.c: move display_mode_esc_sequence_len() for use by other functions Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 5/9] utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 6/9] pretty: two phase conversion for non utf-8 commits Nguyễn Thái Ngọc Duy
2012-09-23 13:54     ` Robin Rosenberg
2012-09-24  1:21       ` Nguyen Thai Ngoc Duy
2012-09-23  9:10   ` [PATCH 7/9] pretty: support padding placeholders, %< %> and %>< Nguyễn Thái Ngọc Duy
2012-10-24  8:25     ` Jeff King
2012-09-23  9:10   ` [PATCH 8/9] pretty: support truncating in %>, %< " Nguyễn Thái Ngọc Duy
2012-09-23  9:10   ` [PATCH 9/9] pretty: support %>> that steal trailing spaces Nguyễn Thái Ngọc Duy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).