I was trying to use a plugin named 'zsh-you-should-use'. It add a preexec hook, which runs after add zshaddhistory hook. The problem is, the preexec hook function depends on the parameter $1 passed by zsh. However, when per-directory-history is toggled on, the $1 parameter of that function turns out to be an empty string. And if I delete the 117th line of per-directory-history.zsh, this problem disappears. So I think this is a problem with 'fc -p'. But I don't exactly understand the mechanism of zsh so I'm not able to go deeper in this problem. Could you please have a look onto this question?
I was trying to use a plugin named 'zsh-you-should-use'. It add a preexec hook, which runs after add zshaddhistory hook. The problem is, the preexec hook function depends on the parameter $1 passed by zsh. However, when per-directory-history is toggled on, the $1 parameter of that function turns out to be an empty string. And if I delete the 117th line of per-directory-history.zsh, this problem disappears. So I think this is a problem with 'fc -p'. But I don't exactly understand the mechanism of zsh so I'm not able to go deeper in this problem. Could you please have a look onto this question?