diff options
author | xengineering <me@xengineering.eu> | 2021-08-22 11:06:26 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2021-08-22 11:06:26 +0200 |
commit | a09b15fb4cdf46657f46fa23e177b079053b8fb1 (patch) | |
tree | aca0add4e87085bc770e67fb11e1009d38e6dbc5 | |
parent | 9d381fbca3a72bfb80c3e7b7b924e2fa6a9c92d8 (diff) | |
download | dotfiles-a09b15fb4cdf46657f46fa23e177b079053b8fb1.tar dotfiles-a09b15fb4cdf46657f46fa23e177b079053b8fb1.tar.zst dotfiles-a09b15fb4cdf46657f46fa23e177b079053b8fb1.zip |
Add Git Branch to Prompt in .bashrc
-rw-r--r-- | .bashrc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -25,5 +25,9 @@ alias horizons='telnet horizons.jpl.nasa.gov 6775' # a NASA server providing da GOPATH=$HOME/go PATH=$PATH:~/bin -PS1='[\u@\h \W]\$ ' +parse_git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' +} + +PS1='[\u@\h$(parse_git_branch) \W]\$ ' |