Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Shelane French
Added: Jan 24, 2020 9:06 PM
Views: 7
Tags: no tags
  1. # bash profile can look for the .bashrc file with this code:
  2.  
  3. # Get the aliases and functions
  4. if [ -f ~/.bashrc ]; then   . ~/.bashrc
  5. fi
  6.  
  7. #.bashrc
  8.  
  9. if [ -f ~/.git-completion.bash ]; then
  10.   source ~/.git-completion.bash
  11. fi
  12.  
  13. # Git branch in prompt.
  14.  
  15. parse_git_branch() {
  16.  
  17.     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
  18.  
  19. }
  20.  
  21. export CLICOLOR=1
  22. export LSCOLORS=GxFxCxDxBxegedabagaced
  23. export PS1="\n[\u@\h \w]\n\[\033[32m\]\$(parse_git_branch)\[\033[00m\]-> "