Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: syntactic trivia
- X-seq: zsh-users 26293
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: syntactic trivia
- Date: Sat, 2 Jan 2021 15:30:39 +0000
- Archived-at: <https://zsh.org/users/26293>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-01/20210102153039.4k35q567uteqeh2u%40chazelas.org>
- In-reply-to: <565cd2e7-c999-5735-4089-a56870713432@eastlink.ca>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Ray Andrews <rayandrews@xxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- References: <565cd2e7-c999-5735-4089-a56870713432@eastlink.ca>
2021-01-02 06:57:32 -0800, Ray Andrews:
> [ "$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.
[...]
(#i) can be applied to part of a pattern:
[[ $x = ((#i)insenstive)-sensitive ]]
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author