Ronald Fischer | 29 Jul 13:24
Favicon

approximate filename globbing

I have trouble understanding the "Approximate Matching" section
in the zsh manual.

Assume I have in my directory files cn1.pl, cn2.pl, cn3.pl, and
I use the following glob pattern:

  ls (#a2)cnx.pl

I had expected to see all my cn?.pl displayed, but instead I 
get a "zsh: no match" error.

How do I correctly use (#a...) for globbing?

Ronald
--

-- 
Ronald Fischer <ronaldf <at> eml.cc>
+  If a packet hits a pocket on a socket on a port, 
+  and the bus is interrupted and the interrupt's not caught,
+  then the socket packet pocket has an error to report.
+		(cited after Peter van der Linden)

Mikael Magnusson | 30 Jul 14:29
Gravatar

Re: approximate filename globbing

2008/7/29 Ronald Fischer <ynnor <at> mm.st>:
> I have trouble understanding the "Approximate Matching" section
> in the zsh manual.
>
> Assume I have in my directory files cn1.pl, cn2.pl, cn3.pl, and
> I use the following glob pattern:
>
>  ls (#a2)cnx.pl
>
> I had expected to see all my cn?.pl displayed, but instead I
> get a "zsh: no match" error.
>
> How do I correctly use (#a...) for globbing?

You need to
setopt extendedglob

--

-- 
Mikael Magnusson

Ronald Fischer | 30 Jul 14:31
Favicon

Re: approximate filename globbing


On Wed, 30 Jul 2008 14:29:43 +0200, "Mikael Magnusson"
<mikachu <at> gmail.com> said:
> 2008/7/29 Ronald Fischer <ynnor <at> mm.st>:
> > How do I correctly use (#a...) for globbing?
> 
> You need to
> setopt extendedglob

Thanks a lot! This works!!!

Ronald
--

-- 
Ronald Fischer <ronaldf <at> eml.cc>
+  If a packet hits a pocket on a socket on a port, 
+  and the bus is interrupted and the interrupt's not caught,
+  then the socket packet pocket has an error to report.
+		(cited after Peter van der Linden)


Gmane