Norman Ramsey wrote:
> >
> > if you use the command line --man and --html options then
> > its already split w.r.t. option and operand documentation
> > ksh --man
> > wait --man
> > continue --man
>
> I tried these again and was reminded of why I don't use them: they
> write to standard error, not standard output. And while man(1)
> does something magical so that the pager works with bold and
> underlined characters,
>
> ksh --man 2>&1 | less
>
> does something unpredictable depending on platform. Sometimes I get
> plain ASCII with no bold or underline. Other times I get an
> unreadable mess of what appear to be vt100 escape codes. I like
> having man(1) take care of these things for me. It is bad enough to
> have to add '| less' to
>
> mumble -man
>
> I am way am too old and stubborn to type 2>&1 as well.
I use:
ksh --nroff 2>&1 | nroff -man | less -s
This more closely emulates man(1) highlighting features. If you're
bothered by the length of this pipeline, put it in a shell function like
this:
function astman
{ "${1:-ksh}" --nroff 2>&1 | nroff -man | less -s
}
The --man option provides terminal-specific highlighting sequences
directly. The less command can't interpret these terminal-specific
sequences, and displays garbage instead. So, if your using the --man
option, don't pipe the output through less. You'll see the highlighting
just fine, and you can use your terminal window's scrollbar (or maybe
even your page up/page down keys, depending on how your terminal window
works) to move through the text.
Terrence Doyle
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users