Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Expansion of patterns
- X-seq: zsh-users 8570
 
- From: Hugo Haas <hugo@xxxxxxxxx>
 
- To: zsh-users@xxxxxxxxxx
 
- Subject: Expansion of patterns
 
- Date: Wed, 09 Mar 2005 13:04:24 +0100
 
- Cancel-lock: sha1:5IjSv/kqp6MvODwaKisioqoO1eI=
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
 
- Sender: news <news@xxxxxxxxxxxxx>
 
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