Last active
          March 15, 2018 19:43 
        
      - 
      
 - 
        
Save mercul3s/25adeff76d208de49dd4 to your computer and use it in GitHub Desktop.  
    rainbow bash prompt
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Bash Prompt Color Variables | |
| blu="\[\033[34m\]" | |
| cyn="\[\033[36m\]" | |
| grn="\[\033[32m\]" | |
| yel="\[\033[33m\]" | |
| red="\[\033[31m\]" | |
| pur="\[\033[35m\]" | |
| gry="\[\033[37m\]" | |
| end="\[\033[00m\]" | |
| # Git branch in prompt. | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| # [\t] = timestamp \u = user @ \h = hostname \W = current directory $(parse_git_branch) = display git branch if in git repo | |
| export PS1="$cyn\u$grn@$yel\h.$red\W$pur\$(parse_git_branch)$gry$ $end" | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment