Rewrite large parts of persistent dirstack handling
authorFrank Terbeck <ft@grml.org>
Fri, 26 Jun 2015 12:07:54 +0000 (14:07 +0200)
committerFrank Terbeck <ft@grml.org>
Fri, 26 Jun 2015 12:07:54 +0000 (14:07 +0200)
commit4ac3e891ea81a5464e7c43bd570f8a95d841fc93
tree9735a0aacfcf2762a015a292003721eac838f7b5
parentcdbb53b4514fd48e8f8edf759b9cc8341056bf27
Rewrite large parts of persistent dirstack handling

In order to allow filtering what gets committed to the persistent
dirstack, I ended up rewriting the handling altogether.

In order to keep a filtered dirstack, we can't actually derive what gets
saved from $dirstack, unless we'd like to apply the filter to all
entries of the stack each time we're about to save the data to disk.

This uses a new parameter $GRML_PERSISTENT_DIRSTACK, which is our
filtered representation of the actual dirstack.

This code allows for using the same filters after *reading* the saved
dirstack from file while the setup is loading (don't worry, a manual
update with examples is coming up).

On the plus side, this removes the dreaded uprint utility, that we ONLY
used in chpwd when saving dirstack to a file. With this new code, the
GRML_PERSISTENT_DIRSTACK parameter use the -U flag of typeset, which
keeps it unique the whole time.
etc/zsh/zshrc