geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Async support for git info

jedahan opened this issue · comments

It seems like there is a big delay getting the git information, especially for large repositories. There are some small optimizations we can do with git log -1 everywhere but maybe looking at pure and other prompts that use async we can get a pty to render the git portion.

That was on my roadmap, but I haven't been able to devote much time.

Using git log -1 could be a temporary fix but I'm not too keen on using that since sooner or later the issue will reappear.

Maybe using async is the most reasonable option. What do you think?

Yeah I think looking at zsh-users/zsh-autosuggestions#180 as inspiration might help.

I wanna see what the minimal lines of code to making a single function async is. It seems a bit more complicated than it needs to be right now.

Are you still interested in implementing the async mechanism?

Found a bit simpler solution at http://www.anishathalye.com/2015/02/07/an-asynchronous-shell-prompt/, should be relatively easy to implement here.

This seems to be a good alternative. If you want to make a PR, feel free to do so!

I might tackle it in the next couple of weeks as well.