Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
why not promote the plague ? (brace|rc|alternative|modern) syntax
hello people,
> On Sun, Dec 8, 2024 at 1:25 AM Lawrence Velázquez <larryv@xxxxxxx> wrote:
> > That's the whole point: it's not clear to me why short "if" and
> > short "while" behave differently when interrupted by EOF in a similar
> > way. Is it a bug? Or is the "while" body sneakily optional?
>
> See the thread starting here:
> https://www.zsh.org/mla/workers/2018/msg01398.html (workers/43595)
About that …
Peter wrote so many inspiring things since I started reading him I
really think twice before objecting anything from it so when he
suggested in https://www.zsh.org/mla/workers/2018/msg01400.html
that "lot of us avoid the alternative syntax like the plague", I took
this for something I have to sleep on.
6 years seems to be a reasonable time to think about something and as
I'm a zsh evangelist for more than 2 decades now, I would like to share
my experience:
* I discovered the alternative syntax "by accident" while reading zshmisc,
falled in love immediately and consider it as one of my top tips of
productivity (I also have `alias @='for it'` in my .zshenv ).
in interactive sessions especially, the algol syntax is such a waste
of time.
* Since then, I discovered the rcquote option, the rc shell and the ^
operator of it. which let me think that the alternative syntax is a
rc inspiration. I find it really cool.
* when I talk about it, 90% react is "how cool! why didn't I knew about it?"
For years, my mind wandered about it …
* most of zsh users just have no idea the alternative syntax exists
because no one expect such a cool feature to be so hidden an discouraged.
* I really would like to know who are the "most of us" (where was it
discussed? what are the arguments?)
* should we promote the plague (for exemple by accepting it in the
completion code)?
I dare asking the question because I also remember a thread where one of
the maintainers (I don't remember how) told me he disagreed with my
.zshenv prelude
setopt warncreateglobal nounset pipefail \
globstarshort extendedglob braceccl \
pathdirs rcquotes \
promptsubst promptbang promptpercent
especially warncreateglobal nounset pipefail
which is the closest I got from perl boilerplate
use strict;
use warnings;
which is famous because it helps to avoid so many hours of debugging.
Also: zsh have perfect companions to make this discipline very friendly
( (( $+foo )), ${foo?nope …}, ${foo:=lol} ).
Now I saw the equivalent of warncreateglobal nounset pipefail promoted
as "good practice" by other communities, I'm confident enough to
understand that we can agree to disagree but curious enough to learn why
we disagree so much on things that are so important to me.
regards
--
Marc Chantreux
Pôle CESAR (Calcul et services avancés à la recherche)
Université de Strasbourg
14 rue René Descartes,
BP 80010, 67084 STRASBOURG CEDEX
03.68.85.60.79
Messages sorted by:
Reverse Date,
Date,
Thread,
Author