← Back to context

Comment by anymouse123456

1 day ago

I'm incredibly impatient with my tools and I've been running omz for many years. I spend my days in tmux/vim and generally run 6-12 shells at a time.

Some quick troubleshooting many years ago narrowed the vast majority of the problem down to the git plugin, especially for large, old repos.

I disabled the git plugin and everything has been fine ever since.

Figured I'd dig deeper and bring back the current branch name without the bloat at some point, but it hasn't bothered me enough to do it.

Current branch without bloat is to cat .git/HEAD, and if that didn't exist, run git symbolic-ref HEAD. The first is faster and works in the common case where you're in the top of a git repo. In either case, run it through ${branch##*/} to strip down to just the current branch.

I have used this for a long time, never understood how people would put all of git in between them and the next prompt.