Created
December 29, 2010 15:53
-
-
Save rafaelsachetto/758655 to your computer and use it in GitHub Desktop.
Dica para ambiente usando RVM (pushd/popd)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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