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

Re: why are these behaviors different?



On Jun 4,  5:40pm, zzapper wrote:
}
} ls *.{txt,php}(.om[1])
} fre.php  fre.txt  ### returns 2 files
} ls *.(txt|php)(.om[1])
} fre.php           ### expected single file

Brace expansion is separate from, and occurs before, filename generation.
So the first case is equivalent to

    ls *.txt(.om[1]) *.php(.om[1])



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