X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=addc8e6fbfc1135eabc32a90760dba20e84af4ed;hb=refs%2Ftags%2F0.2.12;hp=85a61fa471be08fa95058ee3c3a8a7b0841dd7fc;hpb=c6fee93cc936058cf06b2ed808d5e996dca063ad;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 85a61fa..addc8e6 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -372,6 +372,16 @@ fi isgrmlcd && SAVEHIST=1000 || SAVEHIST=10000 # useful for setopt append_history # }}} +# dirstack handling {{{ + DIRSTACKSIZE=20 + if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]]; then + dirstack=( ${(uf)"$(< ~/.zdirs)"} ) + # "cd -" won't work after login by just setting $OLDPWD, so + cd $dirstack[0] && cd $OLDPWD + fi + chpwd() { dirs -pl >! ~/.zdirs } +# }}} + # {{{ display battery status on right side of prompt via running 'BATTERY=1 zsh' if [ -n "$BATTERY" ] ; then if [ -x =acpi ] ; then