larkery / zsh-histdb

A slightly better history for zsh
MIT License
1.25k stars 74 forks source link

Fix pushd/popd in histdb-sync #95

Closed mafredri closed 3 years ago

mafredri commented 3 years ago

When histdb-sync is run inside $hist_dir, pushd won't produce a new directory on the stack and popd will throw us out of the current directory. This PR addresses that and also adds the -q flag to pushd and popd which e.g. prevents execution of chpwd hooks.

larkery commented 3 years ago

Do you have setopt PUSHD_IGNORE_DUPS?

mafredri commented 3 years ago

@larkery ah, that didn't cross my mind but makes perfect sense. Indeed it was enabled. I simplified the approach in this PR by disabling pushd_ignore_dups in local function scope.