I encounterd the following output while using which
[user@localhost ~]$ which gem
gem ()
{
\typeset result;
( \typeset rvmrc;
rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc");
if [[ -n "${rvm_prefix:-}" ]] && ! [[ "$HOME/.rvmrc" -ef "${rvm_prefix}/.rvmrc" ]]; then
rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc");
fi;
for rvmrc in "${rvm_rvmrc_files[@]}";
do
[[ -s "${rvmrc}" ]] && source "${rvmrc}" || true;
done;
unset rvm_rvmrc_files;
command gem "$@" ) || result=$?;
hash -r;
return ${result:-0}
}
I have seen which
show aliases but not bash scripts before.
This script obviously came from RVM but how did it get in to which
and where can I find it on my filesystem? It isn't in .bashrc
.