1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 12:09:36 +08:00

Fix version parsing. Now working with command $ zsh --version

This commit is contained in:
Tristan Carel 2011-04-13 17:24:44 +02:00
parent ca4dabb45e
commit bbf1f87ee6

View File

@ -89,7 +89,7 @@ require_tool ()
envvar_name=$(echo $1 | tr '[:lower:]' '[:upper:]')
tool=$(printenv $envvar_name || echo $1)
local version=$($tool --version 2>/dev/null| \
sed -n 's/.*[^0-9.]\([0-9][0-9.]*\).*/\1/p;q')
sed -n 's/.*[^0-9.]\([0-9]*\.[0-9.]*\).*/\1/p;q')
if test x"$version" = x ; then
echo "$tool is required" >/dev/stderr
return 1