Skip to content

Instantly share code, notes, and snippets.

@rafaelsachetto
Created December 29, 2010 15:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelsachetto/758655 to your computer and use it in GitHub Desktop.
Save rafaelsachetto/758655 to your computer and use it in GitHub Desktop.
Dica para ambiente usando RVM (pushd/popd)
# hack to rvm invoke .rvmrc
cd_with_pushd()
{
if [ $# -eq 0 ]; then
DIR="${HOME}"
else
DIR="$1"
fi
pushd "${DIR}"
cd .
}
cd_with_popd()
{
popd
cd .
}
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
alias cd='cd_with_pushd'
alias bd='cd_with_popd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment