[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pr -S option arg
From: |
Pádraig Brady |
Subject: |
Re: pr -S option arg |
Date: |
Tue, 31 Jan 2012 12:45:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 01/31/2012 11:16 AM, Jim Meyering wrote:
> Pádraig Brady wrote:
>> I notice that `pr -S` takes an optional arg,
>> but the docs say it's required.
>> Should I fix the docs or the code?
>
> Thanks for checking, and good point.
> The "Mandatory arguments to long options are mandatory for short options too."
> statement doesn't apply to optional arguments.
>
> --help implies it's optional with the long-named option,
> "--sep-string[=STRING]":
>
> -SSTRING, --sep-string[=STRING]
> separate columns by STRING,
> without -S: Default separator <TAB> with -J and <space>
> otherwise (same as -S" "), no effect on column options
>
> coreutils.texi says this:
>
> `-SSTRING'
> `--sep-string[=STRING]'
> Use STRING to separate output columns. The `-S' option doesn't
> affect the `-W/-w' option, unlike the `-s' option which does. It
> does not affect line truncation or column alignment. Without
> `-S', and with `-J', `pr' uses the default output separator, TAB.
> Without `-S' or `-J', `pr' uses a `space' (same as `-S" "').
> `--sep-string' with no `=STRING' is equivalent to
> `--sep-string=""'.
>
> You're welcome to make it clearer that the -S option arg is also optional.
>
Cool.
I'm pushing the attached.
cheers,
Pádraig.
optional-args--help.diff
Description: Text document