Spaces in synopses of commands (was: [PATCH v3] time.1: ffix)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Branden,

On 2023-07-30 17:45, G. Branden Robinson wrote:
> Hi Alex,
> 
> At 2023-07-30T17:35:06+0200, Alejandro Colomar wrote:
>> That's the reason to use a non-breaking space over a breaking space.
>> However, I'd also like to see justification for using a non-breaking
>> space over no space at all.
> 
> Readability.
> 
> Consider the synopsis of groff(1) itself.
> 
>         groff [-abcCeEgGijklNpRsStUVXzZ] [-d cs] [-d name=string]
>               [-D enc] [-f fam] [-F dir] [-I dir] [-K enc] [-L arg]
>               [-m name] [-M dir] [-n num] [-o list] [-P arg] [-r cn]
>               [-r reg=expr] [-T dev] [-w name] [-W name] [file ...]
> 
> Pasting into this email, it's stripped of all its formatting, a scenario
> we can imagine affects some number of users, especially those confused
> by the old overstriking convention and who employ crude tools.
> 
>         groff [-abcCeEgGijklNpRsStUVXzZ] [-dcs] [-d name=string]
>               [-Denc] [-ffam] [-Fdir] [-Idir] [-Kenc] [-Larg]
>               [-mname] [-Mdir] [-nnum] [-olist] [-Parg] [-rcn]
>               [-rreg=expr] [-Tdev] [-wname] [-Wname] [file ...]

I agree that having a space between an option and its argument improves
readability.  However, between a positional argument and the ellipsis
that marks that it can appear multiple times, I don't think the same
reasoning applies; at least not so obviously.

I'm referring to  [file ...] vs  [file...].

Cheers,
Alex

> 
> Is that as easy to make sense of?  Maybe it is for some people,
> especially if they already know that groff doesn't ever use a single
> dash as a prefix for a long option name.  But there are conventions
> other than GNU's.
> 
>     xclock [ -help ] [ -analog | -digital ] [ -brief ] [ -chime ] [ -hd
>     color ] [ -hl color ] [ -update seconds ] [ -strftime format ] [
>     -twelve | ‐twentyfour | ‐utime ] [ -padding number ] [ -norender ] [
>     -render ] [ -sharp ] [ -face pattern ]
> 
> That actually proves to be a better example of bad formatting than I had
> hoped for--look at all those problems!  Anyway, an expert can figure out
> that "-utime" doesn't refer to an option "-u" that takes a metasyntactic
> "time" as an argument.  But we shouldn't write man pages only for the
> attention of experts.
> 
> Regards,
> Branden

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux