From 7824dc637db296aebc88263d9f5a3ea36fd50bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 10 Apr 2019 11:47:29 +0200 Subject: [PATCH] git: use is-at-least to test for git version Fixes #7754 --- plugins/git/git.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index ef4697906..b82d49b5e 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -241,7 +241,8 @@ alias gss='git status -s' alias gst='git status' # use the default stash push on git 2.13 and newer -[[ "$(git --version 2>/dev/null)" =~ '^git version ([0-9]+.[0-9]+)' && "$match" -ge '2.13' ]] \ +autoload -Uz is-at-least +is-at-least 2.13 "$(git --version 2>/dev/null | awk '{print $3}')" \ && alias gsta='git stash push' \ || alias gsta='git stash save'