zsh-users
 help / color / mirror / code / Atom feed
* why are these behaviors different?
@ 2016-06-04 17:40 zzapper
  2016-06-04 18:10 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: zzapper @ 2016-06-04 17:40 UTC (permalink / raw)
  To: zsh-users

Hi

touch {joe,fre}.{txt,php}
ls *.{txt,php}(.om[1])
fre.php  fre.txt  ### returns 2 files
ls *.(txt|php)(.om[1])
fre.php           ### expected single file




-- 
zzapper
https://twitter.com/dailyzshtip

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



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

* Re: why are these behaviors different?
  2016-06-04 17:40 why are these behaviors different? zzapper
@ 2016-06-04 18:10 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-06-04 18:10 UTC (permalink / raw)
  To: zsh-users

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


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

end of thread, other threads:[~2016-06-04 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-04 17:40 why are these behaviors different? zzapper
2016-06-04 18:10 ` Bart Schaefer

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