Bash allows me to write the statement,
$ for i in {h..k} ; do echo $i ; done
but zsh only allows number list expansion such as {8..13}
.
What's the best workaround? Something like seq for characters...
zsh$ setopt BRACE_CCL
zsh$ echo {a-k}
a b c d e f g h i j k
zsh$ echo {1-9}
1 2 3 4 5 6 7 8 9
From ZSH Documentation:
BRACE_CCL
Expand expressions in braces which would not otherwise undergo brace expansion to a lexically ordered list of all the characters. See Brace Expansion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With