diff --git a/fish_prompt.fish b/fish_prompt.fish index 2741c96..a359c55 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -638,9 +638,9 @@ function __bobthefish_prompt_rubies -S -d 'Display current Ruby information' [ "$theme_display_ruby" = 'no' ]; and return set -l ruby_version - if type -q rvm-prompt + if type -fq rvm-prompt set ruby_version (__bobthefish_rvm_info) - else if type -q rbenv + else if type -fq rbenv set ruby_version (rbenv version-name) # Don't show global ruby version... set -q RBENV_ROOT @@ -653,9 +653,9 @@ function __bobthefish_prompt_rubies -S -d 'Display current Ruby information' or set -l global_ruby_version system [ "$ruby_version" = "$global_ruby_version" ]; and return - else if type -q chruby + else if type -q chruby # chruby is implemented as a function, so omitting the -f is intentional set ruby_version $RUBY_VERSION - else if type -q asdf + else if type -fq asdf asdf current ruby 2>/dev/null | read -l asdf_ruby_version asdf_provenance or return