diff --git a/functions/_tide_item_ruby.fish b/functions/_tide_item_ruby.fish index 5135be8e..b88f27d5 100644 --- a/functions/_tide_item_ruby.fish +++ b/functions/_tide_item_ruby.fish @@ -1,5 +1,6 @@ function _tide_item_ruby - if path is $_tide_parent_dirs/Gemfile || path is $_tide_parent_dirs/Rakefile || path is $_tide_parent_dirs/*.gemspec || path is $_tide_parent_dirs/.ruby-version || path is $_tide_parent_dirs/.tool-versions - _tide_print_item ruby $tide_ruby_icon' ' (ruby --version | string split ' ')[2]'' + if path is $_tide_parent_dirs/{*.gemspec,Gemfile,Rakefile,.ruby-version,.tool-versions} + ruby --version | string match -qr "(?[\d.]+)" + _tide_print_item ruby $tide_ruby_icon' ' $v end end