Created
December 20, 2011 10:40
-
-
Save dasgib/1501148 to your computer and use it in GitHub Desktop.
pathed_cd for zsh - start new shell in last used directory
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
pathed_cd () { | |
if [ x"$1" = x ]; then | |
cd | |
else | |
cd "$1" | |
fi | |
pwd > ~/.cdpath | |
} | |
alias cd="pathed_cd" | |
if [ -f ~/.cdpath ]; then | |
cd $(cat ~/.cdpath) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment