Developer builds pure-Zsh prompt engine that renders in under 0.7ms with no binaries
A developer has released zline, a shell prompt engine written entirely in pure Zsh that renders in approximately 0.6 milliseconds without relying on compiled binaries, Rust, or C++ daemons. The project was motivated by performance limitations in popular prompt tools like Starship and Powerlevel10k, which depend on external processes or compiled companions that add latency. zline eliminates subshell forks on its critical render path by using native Zsh builtins and parameter expansions in place of common Unix utilities like sed, awk, and cut. For Git repositories, it reads the .git/HEAD file directly using Zsh file descriptors, returning branch and rebase state in roughly 0.07 milliseconds without invoking the git binary. Dirty status and ahead/behind counts are handled asynchronously via a background worker communicating over named pipes, keeping the prompt responsive even in large codebases.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in