tide/functions/_tide_item_ruby.fish
Carl Mercier 9252158e4f
Converted chruby to generic ruby (#437)
* Converted chruby to generic ruby

* Attempt at tests

* Only show the Ruby version if current directory has .rb files

* Only show the Ruby version if current directory has .rb files

* Revert "Only show the Ruby version if current directory has .rb files"

This reverts commit 136b02c1fd.

* Refactor

* Removed .tool-versions

* Sort configs

* Sort icons

* Remove pending changes

* Sort for remove_unusable_items

---------

Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
2023-09-13 21:06:56 -07:00

7 lines
223 B
Fish

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