/bin/less is the default pager on an Ubuntu 14.04.3 LTS desktop OS (the
$PAGER variable is unset) and gnome-terminal 3.6.2-ubuntu1 is used.
If I try for instance:
$ man man
The displayed output conforms to the width of the current Gnome terminal window. No problem there. However when I do:
$ man man | egrep regex
The output does not automatically recognize the terminal window's width. With a setting of 83 columns in terminal's menu Edit > Profile Preferences > Default size, some lines do not conform to the terminal width and are not correctly adjusted to width. As a result I get several instances of:
<standard input>:981: warning [p 8, 0.5i, div `3tbd1,0', 0.0i]: cannot adjust line
(some characters in the warning above vary from warning to warning, presumably because they point to problematic output lines located at different place in the output.)
The pager does not seem to be at fault since this doesn't happen with the command
Could it be the pipe or the rhs of the pipe disrupting things from the point of view of conforming to the Gnome terminal window width ? Is there a way to remedy that ?
EDIT 1: Is there a way to remedy that at session level, i.e. automatically, i.e. without having to check for Gnome terminal's current window width everytime I type a cmd-line that will print to stdout ?