From 528b4e278be57d5eee0320754bb053395511af11 Mon Sep 17 00:00:00 2001 From: Fabio Margarido Date: Wed, 13 Mar 2024 13:21:57 -0300 Subject: [PATCH] Fix golang version prompt when go directive in go.mod has minor version --- functions/fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 2199898..e9ae47b 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -851,7 +851,7 @@ function __bobthefish_prompt_golang -S -a real_pwd -d 'Display current Go inform set -l actual_go_version "0" set -l high_enough_version "0" if type -fq go - set actual_go_version (go version | string match -r 'go version go(\\d+\\.\\d+)' -g) + set actual_go_version (go version | string match -r 'go version go(\\d+\\.\\d+(?:\\.\\d+)?)' -g) if printf "%s\n%s" "$gomod_version" "$actual_go_version" | sort --check=silent --version-sort set high_enough_version "1" end