mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Omit functions and builtins when looking for ruby environment managers
This is especially important for asdf, because it turns out lots of people have aliases and functions called that :) Fixes #160
This commit is contained in:
parent
ed3ca3d618
commit
fcec6aeece
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user