mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
e5b2c3e4be
We have a lot of completions that look like ```fish pip completion --fish 2>/dev/null | source ``` That's *fine*, upstream gives us some support. However, the scripts they provide change very rarely, usually not even every release, and so running them again for every shell is extremely wasteful. In particular the python tools are very slow, `pip completion --fish` takes about 180ms on my system with a hot cache, which is quite noticeable. So what we do is we run them once, store them in a file in our cache directory, and then serve from that. We store the mtime of the command we ran, and compare against that for future runs. If the mtime differs - so if the command was up or downgraded, we run it again. |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish |