-
-
Save rightfold/bef0c4ff2d931cb4cd95 to your computer and use it in GitHub Desktop.
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
$ which cd | |
cd () { | |
if [[ "x$*" = "x..." ]] | |
then | |
cd ../.. | |
elif [[ "x$*" = "x...." ]] | |
then | |
cd ../../.. | |
elif [[ "x$*" = "x....." ]] | |
then | |
cd ../../../.. | |
elif [[ "x$*" = "x......" ]] | |
then | |
cd ../../../../.. | |
elif [ -d ~/.autoenv ] | |
then | |
source ~/.autoenv/activate.sh | |
autoenv_cd "$@" | |
else | |
builtin cd "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment