bugDatabase-driven manual pager suite - Bugs: bug #58752, set a default maximum width for...

 
 

bug #58752: set a default maximum width for display of output

Submitter:  Steve Izma <sjizma>
Submitted:  Sat 11 Jul 2020 08:09:02 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 16 Jul 2020 05:18:44 AM UTC, comment #2: 

Why not have a hypothetical MANMAXWIDTH variable that, if set, specifies a maximum terminal width for man pages?

Users like Steve can set this variable and get the output they want.  Users like Branden can leave it unset and get the output they want.  Neither party needs to engage in the shell games that comment #1 decries.

Dave <barx>
Sat 11 Jul 2020 09:59:23 PM UTC, comment #1: 

I object!

For whatever reasons I find man pages perfectly readable in my wide-ass terminals (> 100 character cells).  The current behavior of man-db's man program has been the default for quite some time and I am anxious to cement it is as the new de facto standard.  :P

I've used big terminals (often maximized to the screen dimensions) on Debian systems for over 20 years and I remember lamenting the waste of terminal space when viewing man pages before Colin got to it.

For example, I use the following in the course of preparing word-diffs when hacking on the groff man pages:


alias manhj="MANWIDTH=\${MANWIDTH:-80} man --nh --nj"


I propose that users with Steve's preference do something similar.

Why not make users with my preference set some new MANMAXWIDTH variable to a blank value, or to some special string like "inf"? A set but empty value turns upon too fine a knife edge to be good user ergonomics, and furthermore encourages poor shell programming practice through the user of the ${FOO-bar} parameter expansion rather than the plainly superior ${FOO:-bar}.

A special out-of-band value is superior, but either approach requires complicating the logic of the above, requiring users to write if statements and comparisons, adding distressing bulk to the example idiom above.

I think an adequate fix for this report is to document the above example or a similar one in the man page.

G. Branden Robinson <gbranden>
Sat 11 Jul 2020 08:09:02 PM UTC, original submission:  

Given a common acceptance that the maximum number of characters
in a line of text should, for comfortable reading, be in the
range of 65 to 75, I suggest that the output from the man command
have a default maximum-width value set at 70.

Since the program knows the width of the terminal to which it is
sending output, this value should set a maximum that only comes
into effect if the width of the terminal is greater than 70 plus
any allowance for a margin after the end of the line (e.g., a
right-hand margin for left-to-right output). If the terminal
width is smaller than the default value, then the line length
should be set to a size appropriate to that width.

This behaviour is distinct from the fixed line length that
results from any setting of the MANWIDTH environment variable.

Steve Izma <sjizma>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by sjizma (Submitted the item)
  • -email is unavailable- added by sjizma
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-11 sjizma Carbon-Copy- Added sjizma

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code