Skip to content

Instantly share code, notes, and snippets.

@kitzberger
Last active March 13, 2019 18:29
Show Gist options
  • Save kitzberger/0c4294373c97cbbf0fd98a925feba864 to your computer and use it in GitHub Desktop.
Save kitzberger/0c4294373c97cbbf0fd98a925feba864 to your computer and use it in GitHub Desktop.

ifne not available?

$ brew install moreutils

git prompt

$ brew install git bash-completion
$ vi $HOME/.bash_profile
# maybe this works:
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
# and maybe that here:
source /usr/local/git/contrib/completion/git-completion.bash
source /usr/local/git/contrib/completion/git-prompt.sh
# maybe here:
source /usr/share/git-core/contrib/completion/git-prompt.sh

PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[31m\]\$(__git_ps1)\[\033[00m\]$ "
GIT_PS1_SHOWDIRTYSTATE=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment