Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: syntactic trivia



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