Which rbenv Which brew
whichとwhereは同じ挙動みたい、、、
code:ruby
where rbenv
rbenv () {
local command
command="${1:-}"
then
shift
fi
case "$command" in
(rehash | shell) eval "$(rbenv "sh-$command" "$@")" ;;
(*) command rbenv "$command" "$@" ;;
esac
}
/usr/local/bin/rbenv
/usr/local/bin/rbenv
~
❯ where brew
/usr/local/bin/brew
/usr/local/bin/brew
~
❯ where rbenv
rbenv () {
local command
command="${1:-}"
then
shift
fi
case "$command" in
(rehash | shell) eval "$(rbenv "sh-$command" "$@")" ;;
(*) command rbenv "$command" "$@" ;;
esac
}
/usr/local/bin/rbenv
/usr/local/bin/rbenv
~
❯ which rbenv
rbenv () {
local command
command="${1:-}"
then
shift
fi
case "$command" in
(rehash | shell) eval "$(rbenv "sh-$command" "$@")" ;;
(*) command rbenv "$command" "$@" ;;
esac
}
~
❯ rbenv which ruby
/Users/usagi/.rbenv/versions/3.1.0/bin/ruby
~
❯ where brew
/usr/local/bin/brew
/usr/local/bin/brew
~
❯ which brew
/usr/local/bin/brew