From e9e4adb946e6b2ced8d125b847c087846081292d Mon Sep 17 00:00:00 2001 From: Alec Lanter Date: Fri, 27 Feb 2026 13:58:50 -0600 Subject: [PATCH 1/2] fix: CRLF line endings break Go version display - add sed inline to gomod_version read to edit out '\r' characters which cause issues with display of go 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 8e67d21..06fe066 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -853,7 +853,7 @@ function __bobthefish_prompt_golang -S -a real_pwd -d 'Display current Go inform set -l d $real_pwd while not [ -z "$d" ] if [ -e $d/go.mod ] - grep "^go " "$d/go.mod" | read __ gomod_version + grep "^go " "$d/go.mod" | sed 's/\r//' | read __ gomod_version break end From 5fcd638c50fbe3bd2c30444552ccd6be82eca54e Mon Sep 17 00:00:00 2001 From: Alec Lanter Date: Sun, 1 Mar 2026 08:41:57 -0600 Subject: [PATCH 2/2] fix: apply bobthecow's builtin instead of sed --- 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 06fe066..22cb9ea 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -853,7 +853,7 @@ function __bobthefish_prompt_golang -S -a real_pwd -d 'Display current Go inform set -l d $real_pwd while not [ -z "$d" ] if [ -e $d/go.mod ] - grep "^go " "$d/go.mod" | sed 's/\r//' | read __ gomod_version + string match -rq '^go\s(?\S+)' < "$d/go.mod" break end