Guest User

Untitled

a guest
Mar 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. alias gg='git log --oneline --graph'
  2. alias gco='git checkout'
  3. alias gs='git status'
  4.  
  5. # OPAM configuration
  6. . /Users/charlie/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
  7.  
  8. parse_git_branch() {
  9. git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
  10. }
  11. # colors
  12. PS1="\[\033[94m\]\u:\\[\033[33;39m\]\w\[\033[m\]\[\033[32m\]\$(parse_git_branch)\[\033[00m\]\nĪ» "
  13. # Tell ls to be colourful
  14. export CLICOLOR=1
  15. export LSCOLORS=Exfxcxdxbxegedabagacad
  16.  
  17. if [ -f ~/.git-completion.bash ]; then
  18. . ~/.git-completion.bash
  19. fi
  20.  
  21. if [[ "$TERM" != "screen" ]] ; then
  22. # Attempt to discover a detached session and attach
  23. # it, else create a new session
  24.  
  25. WHOAMI=$(whoami)
  26. if tmux has-session -t $WHOAMI 2>/dev/null; then
  27. tmux -2 attach-session -t $WHOAMI
  28. else
  29. tmux -2 new-session -s $WHOAMI
  30. fi
  31. else
  32.  
  33. # One might want to do other things in this case,
  34. # here I print my motd, but only on servers where
  35. # one exists
  36.  
  37. # If inside tmux session then print MOTD
  38. MOTD=/etc/motd.tcl
  39. if [ -f $MOTD ]; then
  40. $MOTD
  41. fi
  42. fi
Add Comment
Please, Sign In to add comment