git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 00/12] Support columinized output in tag/branch/ls-files/grep
Date: Sun,  7 Mar 2010 19:09:33 +0700	[thread overview]
Message-ID: <1267963785-473-1-git-send-email-pclouds@gmail.com> (raw)

This adds support to show columnized output in the mentioned commands.
I am quite happy with columnized "git branch/tag".

There is still room for improvement. For example, if "git column" is going to
display all items in one or two lines (too wide screen), then falling back to
one column mode would be better.

I'm also experimenting aligned grep output.  While it's useful
sometimes to look for things near the beginning of line, I don't know
if it's really worth the effort.

Anyway, enjoy the new output (Hmm.. "git config -l" may be applicable for
columnization too)

Nguyễn Thái Ngọc Duy (12):
  Move term_columns() to pager.c
  setup_pager(): save terminal width before redirecting stdout
  Add columnizer
  help: use columnizer
  Add builtin command "column"
  Add helpers to redirect stdout to "git column"
  add core.columns
  tag: support column output with --columns
  branch: support column output with --columns
  ls-files: support column output with --columns
  grep: do not return early in cmd_grep() if there is no error
  grep: support column output with --columns

 .gitignore                   |    1 +
 Documentation/config.txt     |    8 ++
 Documentation/git-branch.txt |    8 ++
 Documentation/git-column.txt |   40 ++++++++++
 Documentation/git-grep.txt   |   10 +++
 Documentation/git-tag.txt    |   11 +++-
 Makefile                     |    3 +
 builtin.h                    |    1 +
 builtin/branch.c             |   18 ++++-
 builtin/column.c             |   42 +++++++++++
 builtin/grep.c               |   48 +++++++------
 builtin/ls-files.c           |   10 +++
 builtin/tag.c                |   17 ++++-
 cache.h                      |    2 +
 column.c                     |  164 ++++++++++++++++++++++++++++++++++++++++++
 column.h                     |   25 +++++++
 command-list.txt             |    1 +
 config.c                     |    6 ++
 environment.c                |    1 +
 git.c                        |    1 +
 help.c                       |   55 +++-----------
 pager.c                      |   95 ++++++++++++++++++++++++
 t/t9002-column.sh            |  101 ++++++++++++++++++++++++++
 23 files changed, 595 insertions(+), 73 deletions(-)
 create mode 100644 Documentation/git-column.txt
 create mode 100644 builtin/column.c
 create mode 100644 column.c
 create mode 100644 column.h
 create mode 100755 t/t9002-column.sh

             reply	other threads:[~2010-03-07 12:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-07 12:09 Nguyễn Thái Ngọc Duy [this message]
2010-03-07 12:09 ` [PATCH 01/12] Move term_columns() to pager.c Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 02/12] setup_pager(): save terminal width before redirecting stdout Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 03/12] Add columnizer Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 04/12] help: use columnizer Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 05/12] Add builtin command "column" Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 06/12] Add helpers to redirect stdout to "git column" Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 07/12] add core.columns Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 08/12] tag: support column output with --columns Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 09/12] branch: " Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 10/12] ls-files: " Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 11/12] grep: do not return early in cmd_grep() if there is no error Nguyễn Thái Ngọc Duy
2010-03-07 12:09 ` [PATCH 12/12] grep: support column output with --columns Nguyễn Thái Ngọc Duy
2010-03-08 14:08 ` [PATCH 00/12] Support columinized output in tag/branch/ls-files/grep René Scharfe
2010-03-08 14:32   ` Nguyen Thai Ngoc Duy
2010-03-09 16:49     ` René Scharfe
2010-03-10  0:27       ` Nguyen Thai Ngoc Duy
2010-03-10  7:26         ` Johannes Sixt
2010-03-10 12:12           ` Nguyen Thai Ngoc Duy
2010-03-11 21:13         ` René Scharfe
2010-03-12  4:22           ` Nguyen Thai Ngoc Duy
2010-03-08 23:08   ` Junio C Hamano
2010-03-09  2:06     ` Nguyen Thai Ngoc Duy
2010-03-09  2:14       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1267963785-473-1-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).