zsh-users
 help / color / mirror / code / Atom feed
* syntactic trivia
@ 2021-01-02 14:57 Ray Andrews
  2021-01-02 15:30 ` Stephane Chazelas
  2021-01-02 15:32 ` Stephane Chazelas
  0 siblings, 2 replies; 11+ messages in thread
From: Ray Andrews @ 2021-01-02 14:57 UTC (permalink / raw)
  To: Zsh Users

         [ "$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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-04  5:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-02 14:57 syntactic trivia Ray Andrews
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

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).