5 ms·
would like to chime in a faster theme written in rust: https://starship.rs/ https://starship.rs/
by perlpimp 6y ago
would like to chime in a faster theme written in rust:
https://starship.rs/ https://starship.rs/
- eurg 6y agoLast time I checked it was slower than https://github.com/romkatv/powerlevel10k https://github.com/romkatv/powerlevel10k, because it doesn't decouple the rendering of the prompt from the background processes collecting status information. Ergo no instant prompt. Also, some other cool tricks w.r.t. prompt vs. backscroll. Has that changed?
- deleted 6y ago[deleted]
- antihero 6y agoIt seems fast enough but once you enter an actual directory of code where it needs to get the version of node, kotlin, package, etc it slows down noticeably. I've ended up disabling most packages because it is absurd to (I assume) be running node --version every time a prompt is generated. It's a shame they can't do these things asyncronously or cache them.
- eurg 6y agoCaching is a bit dangerous, and most shells don't support asynchronous prompt updates. And cross-shell support seems to be a prime feature. Spending probably a lot of effort just for improving zsh experience might just not have been important enough yet.
- antihero 6y agoYeah, it is tricky. Perhaps if the prompt was generated async? Turns out my main issue was due to having a slow node --version command due to using asdf! This project was a huge help: https://github.com/danhper/asdf-exec https://github.com/danhper/asdf-exec
- ylere 6y agoHappy fish+starship user here. Recently all modules where refactored to load lazily: https://github.com/starship/starship/issues/2111 https://github.com/starship/starship/issues/2111 A PR adding full async support is close to being merged, which should fix lag issues for good: https://github.com/starship/starship/pull/2223 https://github.com/starship/starship/pull/2223
- eurg 6y agoThe power of powerlevel10k is that it can draw the plain prompt immediately, and respond to keyboard immediately, and then backfill any advanced prompt information (and properly shifting the already added text to the right and wrapping it correctly). I know that zsh has support for this, and bash does not (powershell neither); my prime reason why I use zsh. Fish, I don't know how it handles prompts. This is very powerful in large git repos etc. You're never waiting for the prompt. You just type immediately, w/immediate response. So, you only wait for the status information to show up when you need it. So you also don't pay an excessive penalty if you prefer overly chatty prompts. AFAICT the lazy-loading and async-support tickets above talk about internal implementation details, timeout support (so cancelling stuff like a too slow status report and showing a simplified prompt). I may misunderstand that, I only gave it a quick glance. Maybe starship already supports this for zsh, or not, but at least they don't promote it front and center.
- enriquto 6y agoThat's crazy. People actually write whole programs to print a whole, ugly, slow, kitsch prompt? What happened of the elegant PS1='; ' ?
- eeZah7Ux 6y agoTacky indeed - but the main issue it's that it takes precious space for information that you don't need to look again and again after each command. Instead you can have a 1-letter command to print out a slew of useful info only when you want.