grml-etc-core
grml-etc-core copied to clipboard
Clarify how `zstyle -T ':grml:chpwd:dirstack'` is supposed to be set
For most zstyles
, I can set them any time and then they apply.
But in https://github.com/grml/grml-etc-core/commit/d005e0b78bac79a566a3b16fb9e66b28bca48d61, the if zstyle -T ':grml:chpwd:dirstack' enable
is on the top-level of .zshrc
, so it will only be read once at the time of .zshrc
evaluation:
https://github.com/grml/grml-etc-core/blob/d005e0b78bac79a566a3b16fb9e66b28bca48d61/etc/zsh/zshrc#L1600
I believe this means that it must be done in .zshrc.pre
; later invocations setting that zstyle
will have no effect at all.
Is this correct?
If yes, could it be changed such that zstyle ':grml:chpwd:dirstack' enable false
works also in the user's normal .zshrc.local
?
If not, it might make sense to extend the explanation in https://github.com/grml/grml-etc-core/commit/d005e0b78bac79a566a3b16fb9e66b28bca48d61#diff-0e012aed4e549254b0e807a707638324d4a262e96dc61bdcf75f10c6b17ce017R139 to explain this restriction.
Good point, thanks for raising this, @nh2.
Yes, zstyle ':grml:chpwd:dirstack' ...
is indeed supposed to take place in .zshrc.pre
and that's what I'm also using as such.
@ft any further ideas/information from your side? :)