From fb8e3bb6a34eaf42917c07c446ac4153951d1fd4 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Thu, 6 Jul 2023 21:25:43 -0700 Subject: [PATCH] use string matching in java item --- functions/_tide_item_java.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/functions/_tide_item_java.fish b/functions/_tide_item_java.fish index 6105acc..272d9a9 100644 --- a/functions/_tide_item_java.fish +++ b/functions/_tide_item_java.fish @@ -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 "(?[\d.]+)" + _tide_print_item java "$tide_java_icon $ver" + end end