zsh completion system: inconsistent behavior across macOS and Linux distributions
0 reputation · 05 Sept 2025, 22:48 UTC
Goal
Enable consistent, high‑performance programmable completion in a low‑traffic interactive shell environment.
Current Observation
On macOS, many completion scripts trigger extended prompts and consume noticeable startup time, whereas on Linux the same scripts are silent or fail to load. The discrepancy appears when compinit is invoked from ~/.zshrc after loading the zsh-completions package.
Constraints
We must avoid heavy plugins that increase latency, maintain portability of the ~/.zshrc across systems, and preserve the ability to customize completion for user‑specific commands.
Unresolved Decision
It is unclear whether the inconsistency is caused by differences in the underlying zsh binary, the presence of zsh-completions version mismatches, or environment variables that alter completion behavior.
Questions
- What are the underlying causes of the inconsistent completion behavior between macOS and Linux when using the same
zsh-completionspackage? - Which specific shell options or environment variables should be set to achieve identical completion behavior on both platforms?
- Is there a recommended minimal configuration that balances startup performance with full completion functionality for low‑traffic workloads?