* [BUG] git help -a should no use page when in pipe
@ 2018-12-11 6:26 许铖
2018-12-11 8:52 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: 许铖 @ 2018-12-11 6:26 UTC (permalink / raw)
To: git
To whom may concern,
Since git 2.20.0, invoking `git help -a` will cause git using page (e.g. less)
to display help message. However, such behaviour is not desirable when
`git help -a` is run inside a pipe or invoked by another program.
Step to reproduce the bug:
git help -a | cat # this freezes the command line prompt.
This bug also causes issues in `hub` when invoking `git <alias>`.
More detail can be found at https://github.com/github/hub/issues/1963
I would suggest `git help -a` only invokes page when stdout is a tty.
Thanks for your attention.
Best Regards,
Cheng
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] git help -a should no use page when in pipe
2018-12-11 6:26 [BUG] git help -a should no use page when in pipe 许铖
@ 2018-12-11 8:52 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2018-12-11 8:52 UTC (permalink / raw)
To: 许铖; +Cc: git
许铖 <thexuc@gmail.com> writes:
> Since git 2.20.0, invoking `git help -a` will cause git using page (e.g. less)
> to display help message.
> ...
> I would suggest `git help -a` only invokes page when stdout is a tty.
It already does so for me. "GIT_PAGER=uc git help -a | cat" where
"uc" is a custom "pager" that is "tr '[a-z]' '[A-Z]'" does not show
things in ucase, but without piping to cat, the output is in ucase
as expected. Perhaps there is something different between what we
are doing.
FWIW, I am not on Windows or on a Mac.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-11 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 6:26 [BUG] git help -a should no use page when in pipe 许铖
2018-12-11 8:52 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).