Subject: Re: bug#11044: bug & RFE

From: Bruce Korb <[email-masked]>
Date: Mon, 19 Mar 2012 14:06:34 -0700

Hi Eric,

On Mon, Mar 19, 2012 at 1:41 PM, Eric Blake <[email-masked]> wrote:
>>   would you-all accept a patch that added a "-g" option to set the goal
>>   column as opposed to deriving it by multiplying the width by 0.93 ?
>
> Yes - I would welcome such a patch, on the grounds of supporting a use
> case currently possible in other existing implementations.  According to
> http://www.manpagez.com/man/1/fmt/, there is no 'g' option, but BSD 'fmt
> 60 70' would operate like your proposed 'fmt -g 60 -w 70'.  In fact, it
> might even be worth to teach GNU fmt about a non-option numeric argument
> being treated as --width rather than as a file name.

I thought about that and decided to not suggest it.  I don't like
conflating something
that is, in essence, a configurable setting with real operands.  I'd
prefer to suggest
"-g" to our BSD friends.  :)

Were it to be implemented in GNU's fmt, you would have to pass two tests:

1. does it match a file name?  If not,
2. is the first (or second) operand a number? (decimal only, or hex/octal, too?)

"Icky"