zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: Zsh Users <zsh-users@zsh.org>
Subject: syntactic trivia
Date: Sat, 2 Jan 2021 06:57:32 -0800	[thread overview]
Message-ID: <565cd2e7-c999-5735-4089-a56870713432@eastlink.ca> (raw)

         [ "$case" = 'insensitive' ] && dirs=( (#i)$1*(/N) ) \
                                     || dirs=(     $1*(/N) )

Since '(#i)' is a modifier of the globing would not this be more intuitive?:

     dirs=( $1*(/N#i) )

Just to understand it, I'm wondering why case filtering would be 
syntactically different from the other filters.

Speaking of intuition:

     [ true ] && do-this\    # No comments here, please.
              || do-that

I wonder how much trouble allowing that would be.  Probably written in 
stone that it will never happen, still, it's an obvious exception and 
I'd guess it would only take five minutes to code, the parser just 
throws out any comment before throwing out the backslash and the 
newline.  A tiny luxury.


             reply	other threads:[~2021-01-02 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 14:57 Ray Andrews [this message]
2021-01-02 15:30 ` Stephane Chazelas
2021-01-02 17:49   ` Ray Andrews
2021-01-02 18:05     ` Bart Schaefer
2021-01-02 18:23       ` Ray Andrews
2021-01-02 18:32         ` Bart Schaefer
2021-01-02 15:32 ` Stephane Chazelas
2021-01-02 18:04   ` Ray Andrews
2021-01-02 19:13     ` Bart Schaefer
2021-01-02 19:40       ` Bart Schaefer
2021-01-04  5:34       ` Daniel Shahaf

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=565cd2e7-c999-5735-4089-a56870713432@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@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).