Change the width of the manup command

I use the Guake terminal emulator a lot. This is the best thing as sliced ​​bred IMO.

But one thing bugged me when I want to read the man pages, the default output width is the width of the terminal windows, which in my case is always full screen, so it is a bit difficult to read.

Is it possible to set the default width for man man a command, pleasant to read, 80 characters?

The human man page has this part:

   MANWIDTH
          If  $MANWIDTH  is set, its value is used as the line length for which manual pages should be formatted.  If it is not set,
          manual pages will be formatted with a line length appropriate to the current terminal (using an ioctl(2) if available, the
          value  of  $COLUMNS,  or  falling  back  to 80 characters if neither is available).  Cat pages will only be saved when the
          default formatting can be used, that is when the terminal line length is between 66 and 80 characters.

      

But I can't figure out where to change it.

I tried to add the line:

MANWIDTH 80

in / etc / manpath.config and ~ / .bashrc but no result.

+3


source to share


2 answers


This is an environment variable.

Try:



MANWIDTH=80
export MANWIDTH
man bash

      

If you want this set to be installed permanently, you can add these first two lines in a shell session start script or similar.

+7


source


You need to set this as an environment variable.

MANWIDTH=80 man man

      

works here and provides a man page for man

in 80 columns.



If you want the .bashrc

correct line entry to be

export MANWIDTH=80

      

Note the absence of spaces around the sign =

. You may or may not need to export

.

+3


source







All Articles