From eac8ccf25e2f8eeb7a06783409a9d0ffa4f43137 Mon Sep 17 00:00:00 2001 From: Martin Gondermann Date: Wed, 17 Sep 2014 09:34:25 +0200 Subject: [PATCH] Updated homebrew instructions in README.md --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 780fad5..ee4387e 100644 --- a/README.md +++ b/README.md @@ -63,15 +63,13 @@ The symbols are as follows: - Run `brew install bash-git-prompt` for the last stable release or `brew install --HEAD bash-git-prompt` for the latest version directly from the repository -- After installing Homebrew should output something like this +- Now you can source the file in your `~/.bashrc` as follows: +```sh +if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then + source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" +fi ``` -==> Caveats -You should add the following to your .bashrc (or equivalent): - source /usr/local/opt/bash-git-prompt/share/gitprompt.sh -``` - -- Now you can source the file above (`/usr/local/opt/bash-git-prompt/share/gitprompt.sh` in this case) from your `~/.bashrc` ### via Git clone