oh-my-bash
oh-my-bash copied to clipboard
Git plugin lags bash prompt for large repositories.
This problem is identical to a problem in oh-my-zsh
, which has a few proposed solutions.
Synopsis
When the current working directory is in a large git repository, the bash prompt takes around 5 seconds (in my case) to load.
Steps to reproduce
- Run
git clone
on a large repository. - Run
cd
into that repository. - Wait several seconds.
- Run any command.
- Wait several seconds.
- See a bash prompt
- Repeat steps 4, 5, and 6, any number of times.
Remarks
This problem occurs in both Ubuntu and Cygwin.
In oh-my-zsh
, but not oh-my-bash
, I was able to speed it up by doing the following:
- Run
cd
into the large repository. - Run
git config --edit
- Add the following lines and save.
[oh-my-zsh]
hide-status = 1
hide-dirty = 1
I think it's an elegant solution because it is on a per-repository basis; however, this does not work oh-my-bash
, not even if I change [oh-my-zsh]
to [oh-my-bash]
.
You can Run git config --edit
and add the following lines and save
[bash-it]
hide-status = 1
This config works for the most theme!
Any suggestion to fix this? Should we make a logic to add suggestion by @sanfusu ?
I'm looking into this, can you guys give me an example for a large repository?
Cheers.