Add tilingaware plugin

Add plugin to save the present working directory over different zsh
sessions. The last change in directory will be preserved.

Add `chpwd' function to change the directory new shells will be opened
in.
This commit is contained in:
Riccardo Sven Risuleo 2014-06-24 19:42:26 +02:00
commit b3977e9ebd

View file

@ -0,0 +1,10 @@
DIRSTACKSIZE=9
DIRSTACKFILE=~/.zdirs
if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then
dirstack=( ${(f)"$(< $DIRSTACKFILE)"} )
[[ -d $dirstack[1] ]] && cd $dirstack[1]
fi
function chpwd() {
print -l $PWD ${(u)dirstack}> $DIRSTACKFILE
}