How does man know?
Rahul Dhesi
dhesi at sun505.UUCP
Wed Oct 4 14:11:27 AEST 1989
In article <2281 at munnari.oz.au> ok at cs.mu.oz.au (Richard O'Keefe) writes:
>Similarly, there is
>nothing special about 'man'. Ok, so it generates a modest amount of output.
>So do thousands of other programs. The point is that if paging is built
>into the terminal driver (thank you whoever put the feature into European
>Unix User Group V7 Unix, thank you whoever put it into SunOS), then it is
>*automatically* available to *every* program and they all look the same
>to users.
Are you suggesting that the pager built into the tty driver be able to
(a) translate control sequences into highlighting/reverse
video/underlining, (b) save the last n screens of output to allow
backward paging, (c) invoke your editor on the file being viewed when
you type "v", (d) give you a help screen when you type "h", (e) change
the tab expansion setting while viewing a file (and remember to change
it back when you are done), etc.?
That would be an awfully complex tty driver.
But if you want to keep the tty driver simple, you need a separate
pager anyway. And "man", wanting at least (a) and (b) above, will
probably still want to use that.
I think the best solution is for the people who don't want man to do
paging is to do something like:
alias man 'man \!* | cat'
or
man() { man $* | cat; }
Rahul Dhesi <dhesi%cirrusl at oliveb.ATC.olivetti.com>
UUCP: oliveb!cirrusl!dhesi
More information about the Comp.unix.questions
mailing list