A bare-bones Git prompt for zsh implemented in Rust for speed (and as a learning exercise).
Configuration is rudimentary because I figured “how often am I going to change the appearance of my Git prompt?”
cargo build --release
rm <bindir>/zsh-rust-git-prompt— MANDATORY on Apple Silicon, optional on Intel. Simply copying or moving the new binary over the top of the old one will cause a code signature mismatch and lead to obscure
zsh: killederrors — see Updating Mac Software. Removing the old binary first flushes its code signature cache.
cp target/release/zsh-rust-git-prompt <bindir>where
RPROMPT='$(git status --porcelain=v2 --branch --show-stash -z 2>/dev/null | zsh-rust-git-prompt)'`(Or
PROMPTif you prefer, but it’s really designed more for
cargo build --release) and reinstall.