use string matching in node item

This commit is contained in:
Ilan Cosman 2023-07-06 21:07:08 -07:00
parent cbdcf44c9c
commit d7f5041617

View File

@ -1,4 +1,6 @@
function _tide_item_node
path is $_tide_parent_dirs/package.json &&
_tide_print_item node $tide_node_icon' ' (node --version | string trim --chars=v)
if path is $_tide_parent_dirs/package.json
node --version | string match -qr "v(?<ver>.*)"
_tide_print_item node $tide_node_icon' ' $ver
end
end