Reminds of of Project Hail Mary. Never heard the word "carapace" before that book...
Carapace: A multi-shell completion library and binary
11–20 of 30 posts
Re: Carapace: A multi-shell completion library and binary
#12> Custom completions can be defined using yaml files. The concept is awesome but it's curious to see YAML at the core of this project, rather than a Turing-complete, embeddable language like Lua.
Re: Carapace: A multi-shell completion library and binary
#13Earlier quoted context omitted.
I have had this snippet in my .zshrc for years, autoload -U compinit && compinit { # Compile the completion dump to increase startup speed. Run in background. zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then # if zcompdump file exists, and we don't have a compiled version or the # dump file is newer than the compiled file zcomp…
I just want to say - thank you! I've been using ZSH since it became the default on macOS and one thing that started annoying me recently is the slow startup time. Your snippet tangibly improved that. Do you by chance have any good resources on optimising my config further?
You could peek at something like zprezto https://github.com/sorin-ionescu/prezto or pure https://github.com/sindresorhus/pure for tips.
Fetching git/hg/... info is always slow, so try and speed that up where you can (as to how to do that, uhh... I know my prompt has a dirty-state check nicked from pure for speed reasons). You can also cache any `asdf init zsh` or similar to a file and do the same "run in background" trick so the next shell will have any changes.
The biggest improvement I can remember was dropping zprezto for my own much smaller config, I really did not need much comparatively. Mostly some git info and "good default" options. I use zgenom for a plugin manager but only have 3 plugins, probably I should just dump it and inline the plugins to avoid getting owned one day.
Re: Carapace: A multi-shell completion library and binary
#14Reminds of of Project Hail Mary. Never heard the word "carapace" before that book...
In Romanian "carapace" means shell. It seems to mean the same in English, too, but I presume is seldom used: https://en.wikipedia.org/wiki/Carapace
Re: Carapace: A multi-shell completion library and binary
#15Earlier quoted context omitted.
> much faster than zsh script completions 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 t…
I have had this snippet in my .zshrc for years, autoload -U compinit && compinit { # Compile the completion dump to increase startup speed. Run in background. zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then # if zcompdump file exists, and we don't have a compiled version or the # dump file is newer than the compiled file zcomp…
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.
Re: Carapace: A multi-shell completion library and binary
#16Reminds of of Project Hail Mary. Never heard the word "carapace" before that book...
In Romanian "carapace" means shell. It seems to mean the same in English, too, but I presume is seldom used: https://en.wikipedia.org/wiki/Carapace
Re: Carapace: A multi-shell completion library and binary
#17Reminds of of Project Hail Mary. Never heard the word "carapace" before that book...
In Romanian "carapace" means shell. It seems to mean the same in English, too, but I presume is seldom used: https://en.wikipedia.org/wiki/Carapace
Re: Carapace: A multi-shell completion library and binary
#18Re: Carapace: A multi-shell completion library and binary
#19Reminds of of Project Hail Mary. Never heard the word "carapace" before that book...
Re: Carapace: A multi-shell completion library and binary
#20Earlier quoted context omitted.
In Romanian "carapace" means shell. It seems to mean the same in English, too, but I presume is seldom used: https://en.wikipedia.org/wiki/Carapace
It's not uncommon in English, though I suspect it's most often used in technical fields like entomology.