1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-19 04:10:09 +00:00

lib: small change to git_compare_version

Fixes #7118
This commit is contained in:
Marc Cornellà 2018-09-08 21:35:03 +02:00 committed by GitHub
parent bb908495de
commit f75d096c1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,7 +185,7 @@ function git_prompt_status() {
# Outputs -1, 0, or 1 if the installed version is less than, equal to, or
# greater than the input version, respectively.
function git_compare_version() {
local INPUT_GIT_VERSION INSTALLED_GIT_VERSION
local INPUT_GIT_VERSION INSTALLED_GIT_VERSION i
INPUT_GIT_VERSION=(${(s/./)1})
INSTALLED_GIT_VERSION=($(command git --version 2>/dev/null))
INSTALLED_GIT_VERSION=(${(s/./)INSTALLED_GIT_VERSION[3]})