From dc3b1377d1989260d699e6a1c259ec114040497b Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Thu, 6 Jul 2023 21:23:51 -0700 Subject: [PATCH] use string matching in go item --- functions/_tide_item_go.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/_tide_item_go.fish b/functions/_tide_item_go.fish index 7c5919f..8dd63a4 100644 --- a/functions/_tide_item_go.fish +++ b/functions/_tide_item_go.fish @@ -1,4 +1,6 @@ function _tide_item_go - path is $_tide_parent_dirs/go.mod && - _tide_print_item go $tide_go_icon' ' (go version | string match -r "[\d.]+") + if path is $_tide_parent_dirs/go.mod + go version | string match -qr "(?[\d.]+)" + _tide_print_item go "$tide_go_icon $ver" + end end