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

Re: how to search for a substring in a parameter?



Sorry for making noise with such an easy question... I even found the
answer myself some time later but you were too fast in answering for
me to tell it. Anyway I now understand the meaning of M, thanks.

Fascinated by that part of the man page I tried the following:

% max=8
% bar=5
% if [[ $bar == <1-$max> ]] {print in } else {print out}
zsh: parse error: condition expected: $bar

It works if I change $max by 8. Is it illegal to have parameters
inside <-> or I'm doing it wrong? The man page is a little ambiguous.



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