Guest User

Untitled

a guest
May 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. ## Paste into ~/.bashrc
  2.  
  3. ## Current Git Branch
  4. PS1="\u@\h:\w\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1)')\"\`$ "
  5.  
  6. ## Current Git Branch with some colour. (Dark Blue and Red)
  7. PS1="\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[37m\]$\[\033[00m\] "
Add Comment
Please, Sign In to add comment