You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

6 years ago
6 years ago
6 years ago
6 years ago
  1. #
  2. # [...]
  3. #
  4. # after the default config
  5. # Show git branch name
  6. force_color_prompt=yes
  7. color_prompt=yes
  8. parse_git_branch() {
  9. git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
  10. }
  11. if [ "$color_prompt" = yes ]; then
  12. # for username green:
  13. # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;95m\]$(parse_git_branch)\[\033[00m\]\$ '
  14. # for username pink:
  15. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;95m\]$(parse_git_branch)\[\033[00m\]\$ '
  16. else
  17. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
  18. fi
  19. unset color_prompt force_color_prompt
  20. # gitg branch views, line from https://gitlab.com/dhole/dot_files/blob/master/.bash_aliases#L39
  21. alias gitg="git log --color --graph --abbrev-commit --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%ar)%C(cyan) %an<%ae>%Creset'"
  22. # ls aliases
  23. alias ll='ls -alF'
  24. alias la='ls -A'
  25. alias l='ls -CF'
  26. # alias
  27. alias n='nvim'
  28. alias t='tmux'
  29. alias c='calcurse-caldav && calcurse && calcurse-caldav'
  30. # go
  31. export PATH=$PATH:/usr/local/go/bin
  32. export GOPATH=$HOME/go
  33. # rust
  34. export PATH="$HOME/.cargo/bin:$PATH"
  35. # python
  36. alias python='/usr/bin/python3.6'
  37. alias pip='/usr/bin/pip3'
  38. export EDITOR=vim