projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57254cb
)
zshrc: check for DIRSTACK{SIZE,FILE} in chpwd()
author
Michael Prokop
<mika@grml.org>
Mon, 3 Feb 2014 13:49:34 +0000
(14:49 +0100)
committer
Michael Prokop
<mika@grml.org>
Mon, 3 Feb 2014 13:50:20 +0000
(14:50 +0100)
If the environment variables are unset chpwd emmits an
error message, so check before using.
Thanks: Frank Terbeck <ft@grml.org> for review
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
bd8ab85
..
1af7ed7
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-1556,6
+1556,7
@@
if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
fi
chpwd() {
+ if (( $DIRSTACKSIZE <= 0 )) || [[ -z $DIRSTACKFILE ]]; then return; fi
local -ax my_stack
my_stack=( ${PWD} ${dirstack} )
if is42 ; then