PDA

View Full Version : Help with terminal man page reader




Simon Liquid
Apr 5, 2004, 12:25 PM
In Jaguar, if I typed 'man <whatever>' it would just spit out the text of the man page, one line of text being one line in the terminal buffer. Then after I'd gone through the whole page, it was still there in the buffer and I could scroll back to it if I wanted, so I could even have 2 or more man pages in the same window.

Now in Panther, it handles them differently. It only puts one screen's worth up at a time and the only way to scroll is with arrow keys inside the terminal program. When done, it clears everything and goes back to the original prompt.

How can I bring the old behavior back? Initially I thought it might be because of the change to bash but I tried changing to tsch and it did the same thing. Now I figure it must have something to do with the display programs but I can't even figure out what to mess with. When reading the man pages, the process name at the top of the terminal window starts out as 'grotty' and then changes to 'less.' I've tried a few things with both programs but nothing's made any difference so far.

Please help, it's just a little thing but it has been irking me quite a lot lately.



Westside guy
Apr 5, 2004, 02:01 PM
Here's an indirect solution. I've found I prefer reading man pages using a GUI tool like manthor:

http://www.versiontracker.com/dyn/moreinfo/macosx/10531

Edit: Crap. It looks like those pages are gone. That's the problem with freeware on occasion... hopefully someone has the latest package somewhere (mine's a bit out of date I see)

robbieduncan
Apr 5, 2004, 02:04 PM
man ls > /tmp/man_ls;more /tmp/man_list;rm /tmp/man_list

Note that if you do this with 2 terminal windows at the same time you should use a different file name in the second one.

reh
Apr 5, 2004, 02:08 PM
Save this script as ~/bin/gman or something. Found it on Mac OS X Hints (http://www.macosxhints.com) a while back.

#!/bin/sh
#
# Converts the man page to a PDF file and then opens
# it in your default PDF viewer.

man -t $1 > /tmp/$1.ps
pstopdf /tmp/$1.ps /tmp/$1.pdf
open /tmp/$1.pdf

robbieduncan
Apr 5, 2004, 02:12 PM
Found a much better answer (works for me in Panther):

man -P more <command>

i.e. man -P more ls

Simon Liquid
Apr 5, 2004, 10:19 PM
Found a much better answer (works for me in Panther):

man -P more <command>

i.e. man -P more ls

Thanks for all the answers. It looks like this last one will work best for me but maybe I'll hunt up one of those GUI programs Westside guy mentioned to try out when I have some time.

w3steve
Aug 29, 2008, 04:09 PM
I found this thread doing a search for the same problem (upgrading to Mac OS 10.5).

From further reading I learned that this behavior is controlled by the rmcup and smcup settings for each terminal (xterm, vt100, etc.)

(See this discussion of xterm under Solaris (http://blogs.sun.com/peteh/entry/fixing_terminfo_so_that_terminal))

I was rolling up my sleeves to edit the settings for xterm when I realized that I never used xterm in the past...huh! maybe that explains the changed behavior!

So I opened terminal preferences, chose Settings -> Advanced and under Emulation I changed "Declare terminal as:" to vt100 (from xterm).

Restarted terminal et voila! the output of man (and vi) remains in the terminal window buffer!

steve
my blog (http://wagiwagi.blogspot.com/)

robbieduncan
Aug 29, 2008, 05:31 PM
You win the thread resurection prize! 4 years it was dead and you brought it back! :D