I want to use a feature only present in newer versions of zsh:
[[ "$foo" =~ "regexp" ]]
where regexp is a regular expression.
Is it possible to do this check?
Something like:
if [[ $ZSH_VERSION > 4.3.9 ]]; then
....
fi
Except that >
won't work.
Ciao!
I just found is-at-least
but I'm not sure if it is available in all/many versions of zsh.
Usage:
autoload -U is-at-least
if is-at-least 4.3.9; then
....
fi
It's described in zshcontrib
.
Ciao!
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