Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Simon Liquid

macrumors regular
Original poster
Jul 4, 2001
223
0
Iowa
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.
 
Chain Some Commands

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.
 
Save this script as ~/bin/gman or something. Found it on Mac OS X Hints a while back.

Code:
#!/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 said:
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.
 
Just change Terminal preferences

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)

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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.