Starship – a cross-shell prompt written in Rust
starship.rs
starship.rs
I'm not sure I understand what problems with GNU Readline the authors were trying to solve. It being written in Rust is definitely not a plus, because the toolchains for integrating C are mature in most mainstream languages.
> Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible.
Having it written in Rust does not magically make it "quick" and "reliable", AT ALL. Slow algorithms, logic errors, or anything that constitutes "shitty code" that would make it not quick, and not reliable (whatever this means).
I use powerlevel10k, which is only for zsh. It looks quite similar, aesthetically, but it advertises having the best performance, using a special git status tool. But I know there are other APIs inside of git libraries, and also some rust-based libraries, that could be even faster.
Would be interested in a performance comparison.
Prompt Benchmark Results Warmup duration 8s Benchmark duration 2.023s Benchmarked prompts 50
In blank folder in /tmp // Starship Time per prompt 40.46ms <-- prompt latency (lower is better)
In blank folder in /tmp // Powerlevel10k Time per prompt 57.91ms <-- prompt latency (lower is better)
In Folder with git // Starship Time per prompt 44.16ms <-- prompt latency (lower is better)
In Folder with git // Powerlevel10k Time per prompt 65.58ms <-- prompt latency (lower is better)
ie: You know you can configure your shell? Ok, this is a good way to do it.
Before I use zsh with some plugins. I change to this and suddenly everything is faster (I was blaming iterm for the slowdown)...
It’s a tool that will change your shell prompt (bash, fish, or zsh) to include information about your environment and project details (Stuff like repo status, dev environment setup, unusual user, etc).
Back in the day, we used to do this sort of thing with magic character sequences interpreted by the shell in shell variables, but things like git integration and python virtual_environment support have apparently pushed it over the edge into a separate tool for some people.
Hope that helps.