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.

43 lines
1.1 KiB

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. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;95m\]$(parse_git_branch)\[\033[00m\]\$ '
  13. else
  14. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
  15. fi
  16. unset color_prompt force_color_prompt
  17. # gitg branch views, line from https://gitlab.com/dhole/dot_files/blob/master/.bash_aliases#L39
  18. 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'"
  19. # ls aliases
  20. alias ll='ls -alF'
  21. alias la='ls -A'
  22. alias l='ls -CF'
  23. # alias
  24. alias n='nvim'
  25. alias t='tmux'
  26. alias c='calcurse-caldav && calcurse && calcurse-caldav'
  27. # go
  28. export PATH=$PATH:/usr/local/go/bin
  29. export GOPATH=$HOME/go
  30. # rust
  31. export PATH="$HOME/.cargo/bin:$PATH"
  32. # python
  33. alias python='/usr/bin/python3.6'
  34. alias pip='/usr/bin/pip3'
  35. export EDITOR=vim