use string matching in java item

This commit is contained in:
Ilan Cosman 2023-07-06 21:25:43 -07:00
parent dc3b1377d1
commit fb8e3bb6a3

View File

@ -1,4 +1,6 @@
function _tide_item_java
path is $_tide_parent_dirs/pom.xml &&
_tide_print_item java $tide_java_icon' ' (java -version &| string match -r "[\d.]+")[1]
if path is $_tide_parent_dirs/pom.xml
java -version &| string match -qr "(?<ver>[\d.]+)"
_tide_print_item java "$tide_java_icon $ver"
end
end