zsh-workers
 help / color / mirror / code / Atom feed
* RE: Bug in filename expansion
@ 1996-06-21 15:26 Ray_Van_Tassle-CRV004
  1996-06-21 16:54 ` Mark Borges
  0 siblings, 1 reply; 4+ messages in thread
From: Ray_Van_Tassle-CRV004 @ 1996-06-21 15:26 UTC (permalink / raw)
  To: Receipt Notification Requested, Receipt Notification Requested
  Cc: Receipt Notification Requested


[[ example deleted ]]
> No, it isn't wrong.  ^pattern matches if pattern does not match.  You 
should
> use groupping.
> 
> zz^(a|b)yy is the same as zz^((a|b)yy) and zz(^(a|b))yy is what you want.
> 
> Zoltan
>
No, that doesn't work either.  Also, if my 1st attempt ("zz^(a|b)yy") is
incorrect, this is a surprise, and it should probably be mentioned in the
documentation. Or maybe the precedence of "^" changed ?
If there isn't a bug here (and I think there is), then we need some
further examples of "how to do it".

Also.... how can I do a parenthisised group at the *end* of a pattern?  It 
thinks that this is a "list of qualifiers".


Here's my trial script & output:
 
setopt verbose
touch zzayy
touch zzbyy
touch zzxyy
ls zz*
zzayy
zzbyy
zzxyy
#next works--shows a & b
ls zz(a|b)yy
zzayy
zzbyy
#next doesn't work--should show x
ls zz^(a|b)yy
./try: no match [9]
# zoltan says the above means the same as next
ls zz(^(a|b)yy)
./try: no match [11]
# zoltan says this will show x. but it doesn't
ls zz(^(a|b))yy
./try: no match [13]
unsetopt verbose



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Bug in filename expansion
@ 1996-06-20 15:29 Ray Van_Tassle
  1996-06-20 20:48 ` Zoltan Hidvegi
  0 siblings, 1 reply; 4+ messages in thread
From: Ray Van_Tassle @ 1996-06-20 15:29 UTC (permalink / raw)
  To: zsh-workers

I do this:
>touch zzayy                                                             ~/temp
>touch zzbyy                                                             ~/temp
>touch zzxyy                                                             ~/temp
>ls zz*                                                                  ~/temp
zzayy  zzbyy  zzxyy

>ls zz(a|b)yy                                                            ~/temp
zzayy  zzbyy

>ls zz^(a|b)yy                                                           ~/temp
zsh: no match
 
Seems wrong.  According to the man pages, the 2nd command should give me
the files that start with "zz", then have either "a" or "b", and end with "yy".
OK.
But the 3rd command should give me the files that start with "zz", then have
a character OTHER than "a" or "b", and end with "yy".
It should give me "zzxyy", but it doesn't.
 
This is with zsh-2.6-beta20
 
Thanks,
Ray Van Tassle
rayvt@comm.mot.com



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

end of thread, other threads:[~1996-06-21 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-21 15:26 Bug in filename expansion Ray_Van_Tassle-CRV004
1996-06-21 16:54 ` Mark Borges
  -- strict thread matches above, loose matches on Subject: below --
1996-06-20 15:29 Ray Van_Tassle
1996-06-20 20:48 ` Zoltan Hidvegi

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