From: Junio C Hamano Date: Thu, 07 Jan 2010 18:01:32 GMT Subject: Re: [PATCH 3/3] Add "ls", which is basically ls-files with user-friendly settings Message-ID: <7vfx6h4ww3.fsf@alter.siamese.dyndns.org> In-Reply-To: <1262884076-12293-4-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > + > + if (show_colums) { > + const char *argv[] = { "column", NULL }; > + > + memset(&cp, 0, sizeof(cp)); > + cp.in = -1; > + cp.out = dup(1); > + cp.argv = argv; > + start_command(&cp); > + close(1); > + dup2(cp.in, 1); > + close(cp.in); > + } I think the code for columnar output used in producing "git help -a" output should be reusable (if not, should be made reusable and reused here).