zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [Bug] S-flag imposes non-greedy match where it shouldn't
Date: Sun, 29 Dec 2019 02:05:34 +0000	[thread overview]
Message-ID: <20191229020534.oqh5ri3nqealx4hj@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CAKc7PVD7UCc5yqDays=xCVFa=-Ns6phhqLd2se_+3iKNzOr5tA@mail.gmail.com>

Sebastian Gniazdowski wrote on Sun, Dec 29, 2019 at 01:56:12 +0100:
> sob., 28 gru 2019, 22:01 użytkownik Daniel Shahaf <d.s@daniel.shahaf.name>
> napisał:
> 
> > Sebastian Gniazdowski wrote on Sat, Dec 28, 2019 at 20:04:21 +0100:
> > > I think that many examples in the man pages are like that – they don't
> > > go the obvious path of just demonstrating the usage but instead, they
> > > cover some edge case that, after (sometimes quite long) thinking
> > > reveal something very peculiar about the feature.
> >
> > So what?  We're not going to accept a patch that adds an unclear
> > explanation
> > simply because other explanations are unclear.
> >
> 
> I think that the style of the docs has a value. At first one can get little
> angry "why the example just doesn't confirm what I already suspect",
> however, after untangling it one most probably will feel satisfaction and
> gratefulness. It's a way to share advanced, expert knowledge.

There should be no untangling.  Documentation is about conveying knowledge, not
about presenting riddles.  The documentation of (S) should explain what (S)
does assuming as little knowledge as practicable.  Likewise, the documentation
of (#b) should, if possible, explain what (#b) does without requiring the
reader to know — or, worse, reverse engineer — details such as the greediness
of the * operator.  That detail should, of course, be documented in the section
about that operator.

> > You can't actually get rid of the variable $foo; it's needed for the «print»
> > call on the next line.
> 
> 
> Just noticing that this shows another non-trivial aspect of the example -
> that it uses mbegin and mend instead of match.

Using mbegin and mend is not non-trivial in the context of that example.

> > Otherwise, I agree.  I'll go ahead and make the change,
> > and also change the spaces to underscores.  Thanks for pointing this out.
> > Do
> > you know any other examples that have room for improvement?
> >
> 
> As I said I see much value in the current style of the docs and I've
> learned much from it, so I don't think it should be changed.

Well, I'm sorry, but I expect consensus will not side with you on this.

Do you intend to send another revision of the (S) docs patch upthread?

  reply	other threads:[~2019-12-29  2:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 20:41 Sebastian Gniazdowski
2019-12-18 20:44 ` Sebastian Gniazdowski
2019-12-19 15:29   ` Daniel Shahaf
2019-12-26 18:35     ` Sebastian Gniazdowski
2019-12-27  4:54       ` Sebastian Gniazdowski
2019-12-27  5:09         ` Sebastian Gniazdowski
2019-12-27  5:29       ` Daniel Shahaf
2019-12-28 19:04         ` Sebastian Gniazdowski
2019-12-28 20:34           ` Bart Schaefer
2019-12-28 21:00           ` Daniel Shahaf
2019-12-29  0:56             ` Sebastian Gniazdowski
2019-12-29  2:05               ` Daniel Shahaf [this message]
2019-12-29  3:14                 ` Sebastian Gniazdowski
2019-12-30 18:00                   ` [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't) Daniel Shahaf
2019-12-30 18:11                     ` Roman Perepelitsa
     [not found]                       ` <CAKc7PVAXLpKqZvmbazZK=mvcz8T-AHJXKusut6aEjkkSLzgdbw@mail.gmail.com>
2019-12-30 20:01                         ` Roman Perepelitsa
2019-12-30 20:20                           ` Sebastian Gniazdowski
2019-12-30 21:24                             ` ${(S)%%*} doesn't match the empty string (was: Re: [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't)) Daniel Shahaf
2019-12-30 21:44                               ` Roman Perepelitsa
2019-12-30 22:11                                 ` Sebastian Gniazdowski
2019-12-30 22:34                               ` Peter Stephenson
2019-12-30 21:40                             ` [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't) Roman Perepelitsa

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=20191229020534.oqh5ri3nqealx4hj@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).