home-config/fish/functions/_tide_item_ruby.fish

7b8185c6ca47a6b6d27cefcd816c49e2bd7cd591 · 223 B · 6 lines raw

1 function _tide_item_ruby
2 if path is $_tide_parent_dirs/{*.gemspec,Gemfile,Rakefile,.ruby-version}
3 ruby --version | string match -qr "(?<v>[\d.]+)"
4 _tide_print_item ruby $tide_ruby_icon' ' $v
5 end
6 end