remember recent path
This commit is contained in:
parent
71a5be89b5
commit
c0653063a9
10
zsh/.zshrc
10
zsh/.zshrc
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user