For the last few years, I’ve been using impromptu for setting my bash prompt. However, it felt in perpetual beta status and I wanted to try out something new, so today I installed bash-git-prompt and am giving it a try.
It was super easy to get started with it following the instructions.
brew install bash-git-promptfor the last stable release or
brew install --HEAD bash-git-promptfor the latest version directly from the repository
- Now you can source the file in your
~/.bash_profileas follows:if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then __GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" fi
So far, it seems like something that should do the job. If not, I’ll look for a new solution. Let me know in the comments how you setup and manage your prompt.