Re: mutt/2630: color indicator doesn't accept regex as described
The following reply was made to PR mutt/2630; it has been noted by GNATS.
From: Derek Martin <code@xxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc:
Subject: Re: mutt/2630: color indicator doesn't accept regex as described
in manual
Date: Sun, 25 Mar 2007 20:27:35 -0400
--10jrOL3x2xqLmOsH
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
On Sun, Mar 25, 2007 at 08:05:01PM +0200, Sweth Chandramouli wrote:
> On Sunday, 25 March 2007 at 11:44:40 EDT,
> Alain Bench (<veronatif@xxxxxxx>) wrote:
> > Yes. In "Usage: color object foreground background [ regexp ]", the
> > regexp is not really optional, but either prohibited or mandatory,
> > depending on the object. And the list of objects states which ones want
> > a regexp. The indicator object doesn't take a regexp (just like
> > attachment, bold, error, hdrdefault, and some such...).
> >
> > This documentation seems rather clear to me, as it is. Would you (or
> > anyone else) have a suggestion enhancing the clarity of this point?
>
> Square brackets in command syntax definitions almost universally means
> "optional argument"
FWIW, I agree with this. In the past I also found this confusing,
though I did get it after a second reading and actually trying it.
> color re_object foreground background regexp
> color non_re_object foreground background
> color pattern_object foreground background pattern
> uncolor pattern_object pattern [ pattern ... ]
Although a bit more verbose than I think people would generally
prefer, I agree here too. Moreover, you will often see this style of
repeating syntax for multiple syntax forms in man pages, c.f.
useradd(8).
--
Derek D. Martin
code@xxxxxxxxxxxxxx
--10jrOL3x2xqLmOsH
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFGBxN3HEnASN++rQIRAuvoAJ4hMDeEtzZ2gPo248kpjVKjSDNQEgCeNV7k
SAYFZhg5aUcM2eSdwqh3bC8=
=ME14
-----END PGP SIGNATURE-----
--10jrOL3x2xqLmOsH--