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

Re: <..> ranges in globbing



On 31 Dec 1997, Geoff Wing wrote:

> Heyla,
> % touch 101 111 121
> % ls <10-12>1
> ls: <10-12>1: No such file or directory

> Now, it's obvious why it's failing, since 101, 111 & 121 don't match the
> 10 to 12 range.  My opinion is that it probably shouldn't fail in this case,

Indeed. Any glob experts around?

> but maybe a different operator or option/modifier should be used to get it
> to match. since there may be cases where someone wants to match on, say,
> ``<1-50>foo'' and not get, say, ``100foo'' matching.

<1-50>foo would never match 100foo, even with the behaviour described
above. Even though "<1-50>" could expand to `10', it still leaves an
unexplained `0'.  "<1-50>foo" != "<1-50>0foo", so there is no need for an
extra operator.

--
Wessel Dankers




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