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