4 ms·
I added logic to mine to check for a .noprompt file and disable the git part of my bash prompt as I generally want it enabled, but a few large repos are too slo
by brandonwamboldt 11y ago
I added logic to mine to check for a .noprompt file and disable the git part of my bash prompt as I generally want it enabled, but a few large repos are too slow with it. You could do something similar, I'm sure.
- leni536 11y agoI wonder if an asynchronous approach could be implemented. Like starting the git status and the likes in a separate process and killing it after a certain timeout if it takes too long. While I like that there is a .noprompt feature it's mainly a workaround. Maybe there could be a toggle feature where the user can turn on and off the git prompt on demand, wouldn't be hard to implement. Maybe I will start hacking on it, I have some ideas to optimize it further.
- anishathalye 11y agoIt can be done, and it actually works quite well. See this post for a demo + code: http://www.anishathalye.com/2015/02/07/an-asynchronous-shell-prompt/ http://www.anishathalye.com/2015/02/07/an-asynchronous-shell...
- leni536 11y agoWell this is awesome, thanks for the link.