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

Re: ls g^h



Op 22 jan 2009, om 20:12 heeft zzapper het volgende geschreven:

Hi
When I mistyped a
^g^h   type substitute
with
g^h

I was surprised to find that it matched
a directory "growth"
eg
ls g^h   would list the directory

what functionality/fng is that? (hope it's not me being dumb)


In zshguide.pdf (around page 227) there is some discussion on  
EXTENDED_GLOB: it's part of that.
g^h is the pattern  "everything starting with g but not matching "h"  
exactly ". You happened to have exactly
one file starting in 'g',  I suppose (the final h seemingly matching  
is coincidental).
E.g. if I have 2 files "good" and "growth" then g^h matches them both,  
with EXTENDED_GLOB set.
In short: it becomes a globbing pattern by virtue of the presence of ^

Regards

Henno Brandsma


--
zzapper
http://www.successtheory.com/tips/vimtips.html
http://www.successtheory.com/tips/zshtips.html
http://www.successtheory.com/tips/cygwintips.php   (in progress)







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