use string matching in go item

This commit is contained in:
Ilan Cosman 2023-07-06 21:23:51 -07:00
parent a2371e71e0
commit dc3b1377d1

View File

@ -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 "(?<ver>[\d.]+)"
_tide_print_item go "$tide_go_icon $ver"
end
end