From 9dbdd757856760d471d3ebc6aca10ef681dd319c Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 4 May 2016 23:37:16 +0200 Subject: [PATCH] zshrc: dirstack: skip for ZSH_SUBSHELL Otherwise `(cd foo)` would add `foo` to the stack, which is probably not what you would expect. --- etc/zsh/zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index c03b614..84d37a9 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1613,6 +1613,7 @@ if zstyle -T ':grml:chpwd:dirstack' enable; then } chpwd() { + (( ZSH_SUBSHELL )) && return (( $DIRSTACKSIZE <= 0 )) && return [[ -z $DIRSTACKFILE ]] && return grml_dirstack_filter $PWD && return -- 2.1.4