From a9cc3400fa7c230818ef774b20df19644ba401b9 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Thu, 18 Feb 2016 23:14:28 -0800 Subject: [PATCH] Use `type -q` instead of `which`. --- fish_prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index a9e84b4..1530aae 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -466,9 +466,9 @@ end function __bobthefish_show_ruby -S -d 'Current Ruby (rvm/rbenv)' set -l ruby_version - if which rvm-prompt >/dev/null 2>&1 + if type -q rvm-prompt set ruby_version (__bobthefish_rvm_info) - else if which rbenv >/dev/null 2>&1 + else if type -q rbenv set ruby_version (rbenv version-name) # Don't show global ruby version... set -q RBENV_ROOT; and set rbenv_root $RBENV_ROOT; or set rbenv_root ~/.rbenv