Skip to content

Instantly share code, notes, and snippets.

@benlieb
Last active December 12, 2015 01:49
Show Gist options
  • Save benlieb/4694045 to your computer and use it in GitHub Desktop.
Save benlieb/4694045 to your computer and use it in GitHub Desktop.
benlieb@bens 03:48 PM ~/my_life/sites/HostMonster/public_html/pixelearth.net >
$ type gem
gem is a function
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}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment