Guest User

Untitled

a guest
Feb 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. # git tab auto-completion
  2. #
  3. # install bash-completion from mac ports
  4. # with this you also get tab completion for ssh and few others
  5. sudo port install bash-completion
  6.  
  7. # add to your ~/.profile or ~/.bash_login as instructed by mac ports
  8. if [ -f /opt/local/etc/bash_completion ]; then
  9. . /opt/local/etc/bash_completion
  10. fi
  11.  
  12. # add git completion support
  13. # copy over git-completion.bash from the contrib dir of your local install of git to bash_completion.d
  14. # or use attached copy
  15. sudo cp /usr/local/git/contrib/completion/git-completion.bash /opt/local/etc/bash_completion.d
  16.  
  17. # set command prompt to display current git branch you are working on. very handy
  18. # add to your ~/.profile or ~/.bash_login
  19. PS1='\h:\W$(__git_ps1 "(%s)") \u\$ '
Add Comment
Please, Sign In to add comment