-
I see that you’re using go-git, which has a problem with worktree.Status being unusably slow—and in a prompt you’ll most certainly need to use it. I know because I tried writing my prompt using go-git, and had it hang on a work repo for a good minute. Eventually bit the bullet and switched to git2go (libgit2 bindings; uses cgo).
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
So what I did was write my own little "gituilts" library and for something like getting the current HEAD, we'll drop into go-git's "plumbing" library directly and let it handle this sort of thing, because it does it well and fast enough.
-
Starship is pretty slick, but I feel like it's lacking in the customization department. It's easy to get it to display whatever you want, but hard to get it to show it exactly how you want it. If you want a "powerline" style prompt, that's basically impossible in Starship (although it's one of the most upvoted feature requests). Or using color gradients on the prompt - I have this 16.7M color display, why am I limited to flat colors? Finally I'm a big fan of posh git, and Starship doesn't have the ability to display anything like this natively. I used a custom command to run a modified version of posh-git for a long time, but it wasn't very fast.