Open yggdr opened 9 years ago
per-directory-history also uses a chpwd
hook (see jimhester/per-directory-history/per-directory-history.zsh#L144), so they must be interfering with each other somehow. Try adding the hooks in the opposite order and see if that helps things any.
Also it looks like you are sourcing both the script from this repository and the one from oh-my-zsh, which may be messing things up, I would only source the one from here.
You could also try adding -U
to the autoload command, which would ensure there is only one instance of the function loaded.
When I move the add-zsh-hook
directly after my autols
function declaration, zsh complains that there is no add-zsh-hook
. I have to manually add it to chpwd_functions like so chpwd_functions=('autols' $chpwd_functions)
. Here it doesn't matter whether autols comes first or not, the behaviour doesn't change.
The double loading was a mistake when I tried to comment out most of zgen load
. You can ignore it.
Can you reproduce the behaviour when you add an autols functions like I did?
Try #13…
On install I saw an error suggesting that the add-zsh-hook were not recognised…
Thus, the PR is a simple fix…
@IsmailM Nope, doesn't help, but the hooks were always added, so that can't be the problem: echo $chpwd_functions _per-directory-history-change-directory autols _powerline_tmux_set_pwd
Hi, the history files seem to not get written to when I have the following autols function (excerpt from my zshrc). When I remove the autols function, it might start working, but not necessarily immediately?! I'm a bit confused by this behaviour, maybe you can figure it out? The per-directory history files get apparently touched, but not actually written to. Files are writeable by my user of course. Removing .directory-history doesn't help, the directory structure and history files get created, but not pupulated.