Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometimes running man outputs badly line-wrapped text. If I run man, quit, then resize the terminal window and run man again, it formats it according to the new window width. But if I run man, resize the window (the text gets messy), quit, and then run man again, it still formats it badly like before.

But sometimes it doesn't happen even if I resize the window while man is running, and sometimes it happens even after I make a new, resized terminal before running man for the first time in that window.

How can this be fixed? I have tried the man -c option and R, r, ⌃R and ⌃L to “repaint” the screen while viewing the manpage (my man uses less).

I don't have MANWIDTH set. I'm using iTerm2.

share|improve this question

migrated from stackoverflow.com Mar 16 '12 at 20:27

This question came from our site for professional and enthusiast programmers.

    
Can I bump this question? i.imgur.com/plUSw.jpg –  hawk Apr 24 '12 at 15:47

1 Answer 1

up vote 0 down vote accepted

Sounds like a bad interaction between cat pages (the cache of already-formatted man pages) and the fact that man uses the current width of the terminal at time-of-formatting. In the output of man man (the man page for the man command), I see:

No cat pages are saved when the required cat directory does not exist.
No cat pages are saved when they are formatted for a line length different
from 80.  No cat pages are saved when man.conf contains the line NOCACHE.

That may help.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.