Re: Bug#295328: general: Help messages to stderr should be banned
On Tue, 15 Feb 2005 09:19:35 -0800
"H. S. Teoh" <email@example.com> wrote:
> On Mon, Feb 14, 2005 at 11:06:30PM -0500, Justin Pryzby wrote:
> > I occasionally install a program and need to know how to use it as
> > quickly as possible; for example, while reading through bug reports.
> > So, I run foo --help. Sometimes, the help screen is more than 25
> > lines long, and it scrolls on past. So, I run foo --help |less.
> > Occasionally, though, foo writes its help output to stderr, and I'm
> > left with an empty less buffer. So, I try again: foo --help 2>&1
> > |less. This is a pretty obnoxious command to have to type just to
> > see what the required commands are, and in what order they are taken
> > (and, I guess csh doesn't even allow it).
> Actually, in csh/tcsh it's very un-obnoxious: foo --help |& less
> This is one of the things I wish bash supports, so that I can switch
> to bash. (I use csh/tcsh as my primary shell.)
bash can be easily forced to be even more un-obnoxious, put:
$1 --help 2>&1|pager
in your ~/.bashrc, then "helpof command" gives you all.
Shorten function name to your likings and probably you have to type less
than with "command --help".
Ricardo Mones Lastra - firstname.lastname@example.org
Centro de Inteligencia Artificial, Universidad de Oviedo en Gijon
33271 Asturias, SPAIN. - http://www.aic.uniovi.es/mones