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

Re: array matching: inconsistent behaviour ?



On Wed, Jan 09, 2013 at 12:00:34PM +0530, rahul wrote:
> Or am I doing the matching wrong? I am storing file names in an array.
> Later I match filenames against those in the array for various purposes.
> The filenames contain spaces and in this unfortunate case round brackets.
> File names with brackets are failing the match.
> 
> FOO=()
> x="a file"
> y="a(file)b"
> 
> FOO+=($x)
> FOO+=($y)
> 
> print $FOO[(i)$x]
> print $FOO[(i)$y]
> 
Looks like if using "e" flag, both would be matched here.



Messages sorted by: Reverse Date, Date, Thread, Author