Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
for loop with variable
- X-seq: zsh-users 30651
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: for loop with variable
- Date: Mon, 11 May 2026 09:44:56 -0700
- Archived-at: <https://zsh.org/users/30651>
- List-id: <zsh-users.zsh.org>
% var=" a b c "
% for aa in $=var; do echo $aa; done
a
b
c
% for aa in [a-c]; do echo $aa; done
c
... In the last 'for' it wants to find files whereas in the
previous it knows it's looking at text. Could the previous be
done on one line? That is, the range '[a-c]' would be understood
to be just text, not a file glob?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author