(no title)
bPspGiJT8Y | 1 year ago
I'm curious where did you get that from.
Edit: I read the note in your dotfiles repo. Yes calling `compinit` on each shell invocation is going to be really slow. That's not how you're supposed to do it, you could at least add the `-C` flag to cache the completions. Ideally you'd also use `zcompile` to compile the cache to ZSH word code. This puts my completions initializing time at ~20ms on a lower/mid-end laptop. Additionally you can do the trick `fish` does and defer the initialization of completions until the first hit of Tab key, so the impact on shell startup time is exactly 0.
bongobingo1|1 year ago
Do you have any pointers for the "load on tab" idea? I didn't turn up any good results in DDG and LLMs were just hallucinating.
BTW I believe `-C` will disable some cache checking, caching is enabled by default
> To speed up the running of compinit, it can be made to produce a dumped configuration that will be read in on future invocations; this is the default, but can be turned off by calling compinit with the option -D.
> ...
> ... The check performed to see if there are new functions can be omitted by giving the option -C. In this case the dump file will only be created if there isn't one already.
bongobingo1|1 year ago
NateEag|1 year ago
This is bash, not zsh, but I have this working in my dotfiles by just telling bash where to look for my custom on-demand completions:
https://github.com/NateEag/dotfiles/blob/6862726ad2ecaa3a30e...
I imagine something similar works for zsh.
nikolatt|1 year ago
Do you by chance have any good resources on optimising my config further?
bPspGiJT8Y|1 year ago
You're right, my memory has let me down.
> Do you have any pointers for the "load on tab" idea? I didn't turn up any good results in DDG and LLMs were just hallucinating.
The simplest implementation would be something like
Edit: I see now you already figured it out, yeah that's exactly what I meant