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

Expansion of patterns



Hi.

I've been wanting to expand patterns that do not match filenames. For
example:

  echo a1 a2 a3

could be (hopefully) written:

  echo a[1-3]

However, I get:

  zsh: no matches found: a[1-3]

I sure can do:

  (for i in $(seq 1 3); do echo a$i; done)| xargs echo

but it clearly isn't as simple, and it works for simple cases but
wouldn't work in complex ones.

Is there any way to expand patterns like this in a simple way?

Cheers,

Hugo

-- 
Hugo Haas - http://larve.net/people/hugo/



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