tags 411721 fixed-upstream
thanks

On Tue, Feb 20, 2007 at 10:25:53PM +0800, Dan Jacobson wrote:
> I give up. There are too many man pages that make apropos ugly.
> $ apropos diff|perl -nwle 's/-.*/$l=length $&/e;print if $l>99'
> miff (4)             303
> mogrify (1)          194
> pitchplay (1)        142
> r.cost (1grass)      177
> r.resamp.rst (1grass) 184
> r.sun (1grass)       454
> r.surf.fractal (1grass) 321
> 
> One cannot continue begging each author to get into line.
> 
> Therefore apropos needs a default truncation column, which can be
> overridden by $COLUMNS or a command line switch or something.

Seems reasonable; thanks for the suggestion. I've implemented this
upstream, so it will be in the next upstream release of man-db. MANWIDTH
overrides the width, and -l/--long disables the truncation altogether.

Sun Aug 19 20:48:42 BST 2007  Colin Watson  <[EMAIL PROTECTED]>

        Truncate apropos/whatis output to the terminal width by default
        (thanks, Dan Jacobson; Debian bug #411721).

        * lib/linelength.c: New file for terminal line length detection,
          split out from src/man.c. Unlike the previous implementation, this
          does its own memoisation rather than requiring explicit
          initialisation.
        * lib/linelength.h: Prototype get_line_length.
        * lib/Makefile.in: Always compile linelength.c.
        * src/man.c (line_length, store_line_length): Remove.
          (get_roff_line_length): Use get_line_length.
          (main): We no longer need to call store_line_length.
        * src/whatis.c (args, long_options, main): New -l/--long option.
          (usage): Document it.
          (display): Truncate names and descriptions to fit within the
          terminal width.
        * man/man1/apropos.man1 (SYNOPSIS, OPTIONS, ENVIRONMENT): Document
          --long and the MANWIDTH override.
        * man/man1/whatis.man1 (SYNOPSIS, OPTIONS, ENVIRONMENT): Likewise.
        * docs/NEWS: Document this.

Cheers,

-- 
Colin Watson                                       [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to