Created
August 31, 2019 23:52
-
-
Save jonleighton/1f0b96b49247a07dbaa30fbbe70b34f7 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
# save path on cd (chpwd is a zsh hook) | |
function chpwd { | |
pwd > ~/.last_dir | |
} | |
# restore last saved path on launch | |
if [[ -f ~/.last_dir ]]; then | |
cd $(cat ~/.last_dir) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment