public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH v2 1/2] rpmatch.3: clarify first-character-only FUD
Date: Sat, 2 Oct 2021 19:32:10 +0200	[thread overview]
Message-ID: <59ee1f02-8b38-f7f2-1932-e50a412a72f9@gmail.com> (raw)
In-Reply-To: <39075e7155b7e992b6af5b548258a46d831e025d.1633177011.git.nabijaczleweli@nabijaczleweli.xyz>

Hi наб!

On 10/2/21 2:18 PM, наб wrote:
> It's plain not true as-written ‒ locales can and do provide longer matches
> (Aramaic has a "አዎን" alternative, for example) ‒ but it's important to
> note that (a) this may be an issue and (b) nonetheless this is the right
> way to process this
> 
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
> ---
> This should resolve both the unnecessary FUD and the doubts it would
> raise, while preserving the note. I'm not sure I'd agree with C locale
> being the most important one (I'd put that burden on "the current one"),
> but it's mentioned here because English locales (and most other ones for
> YESEXPR/NOEXPR) derive from it.

Yep!  I applied both v2 patches for rpmatch.3.

Thanks,

Alex

> 
>   man3/rpmatch.3 | 20 ++++++++------------
>   1 file changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/man3/rpmatch.3 b/man3/rpmatch.3
> index 846c492b7..1f9732e3f 100644
> --- a/man3/rpmatch.3
> +++ b/man3/rpmatch.3
> @@ -125,19 +125,15 @@ is available on a few other systems.
>   .\" It is available on at least AIX 5.1 and FreeBSD 6.0.
>   .SH BUGS
>   The
> -.BR rpmatch ()
> -implementation looks at only the first character
> -of
> +.BR YESEXPR " and " NOEXPR
> +of some locales (including "C") only inspect the first character of the
>   .IR response .
> -As a consequence, "nyes" returns 0, and
> -"ynever; not in a million years" returns 1.
> -It would be preferable to accept input strings much more
> -strictly, for example (using the extended regular
> -expression notation described in
> -.BR regex (7)):
> -.B \(ha([yY]|yes|YES)$
> -and
> -.BR \(ha([nN]|no|NO)$ .
> +This can mean that "yno" et al. resolve to
> +.BR 1 .
> +This is an unfortunate historical side-effect which should be fixed in time
> +with proper localisation, and should not deter from
> +.BR rpmatch ()
> +being the proper way to distinguish between binary answers.
>   .SH EXAMPLES
>   The following program displays the results when
>   .BR rpmatch ()
> 


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

  reply	other threads:[~2021-10-02 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 13:46 [PATCH 1/2] rpmatch.3: remove first-character-only FUD наб
2021-09-21 13:46 ` [PATCH 2/2] rpmatch.3: clarify availability to glibc, Fx, and AIX наб
2021-09-21 15:20 ` [PATCH 1/2] rpmatch.3: remove first-character-only FUD Alejandro Colomar (man-pages)
2021-09-21 16:06   ` наб
2021-09-21 23:25     ` Alejandro Colomar (man-pages)
2021-09-22  9:12       ` Alejandro Colomar (man-pages)
2021-10-02 12:18 ` [PATCH v2 1/2] rpmatch.3: clarify " наб
2021-10-02 17:32   ` Alejandro Colomar (man-pages) [this message]
2021-10-02 12:18 ` [PATCH v2 2/2] rpmatch.3: clarify availability to glibc, Fx, and AIX наб

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=59ee1f02-8b38-f7f2-1932-e50a412a72f9@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox