Closed vhdirk closed 9 months ago
After reading the docs once again, I must admit I was mistaken. It doesn't mention caching for fpath anywhere. So this is actually more of a feature request
I'm going to replace built-in caching of znap
commands with a dedicated znap cache
command. So, I will close this issue, but you'll be able to use that instead. 🙂
Describe the bug
znap fpath
does not cache the result of the function it evaluates, causing it to run everytime a new terminal is openened.While the prompt renders immediately, the first command then takes some time.
Steps To Reproduce
In
.zshrc
:Then open a new terminal. Then open another one.
Expected behavior
If the output of
helm completion zsh
is cached,/tmp/shouldnottouch
should only contain a single lineObserved behavior
/tmp/shouldnottouch
contains 2 lines, meaning that the command ran twiceEnvironment:
Additional context