One common workflow of mine is to open a manual page in a terminal, then another terminal in which to test things. The man page is formatted to the initial dimensions of the first terminal. When I now resize my windows (or have my WM do that for me automatically), there is either a gap to the right of the preformatted page, or lines wrap. At this point I usually q
(uit) and !!
(run again), which loses my position in the page.
I assume the formatting process is quite CPU intensive, or maybe it stems from ancient times of fixed terminal sizes. The less
pager dynamically reacts to terminal resize events, so it should be possible in theory.
I tried perusing man pages, searching the Web, asking on IRC -- the whole lot -- but couldn't come up with anything.
Can I trigger reformatting from within or outside of the man utility?
Is there a version of the man utility that resizes the page dynamically?
Is there way to customize some part of the formatting/display process to make it update on
SIGWINCH
?
man
actually usesless
as the pager; you can hith
in a man page to get theless
help screen. I'm not sure why it doesn't dynamically resize man pagesman
renders the output to the width of the term. What you need is a pager that can bookmark where you are in the document, re-execute man (which it really has no idea about since it's piped to it) and return to the bookmark. Alternatively, a new man command that incorporates a pager.