remember recent path

This commit is contained in:
Václav Uruba 2020-12-20 19:15:04 +01:00
parent 71a5be89b5
commit c0653063a9
Signed by: uruba
GPG Key ID: 0059B34D61727BB0

View File

@ -28,3 +28,13 @@ bindkey "^[[H" beginning-of-line
bindkey "^[[4~" end-of-line
bindkey "^[[4h" overwrite-mode
bindkey "^[[P" delete-char
# 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