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 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;95m\]$(parse_git_branch)\[\033[00m\]\$ '
14else
15 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
16fi
17unset color_prompt force_color_prompt
18
19# gitg branch views, line from https://gitlab.com/dhole/dot_files/blob/master/.bash_aliases#L39
20alias gitg="git log --color --graph --abbrev-commit --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%ar)%C(cyan) %an<%ae>%Creset'"
21
22# ls aliases
23alias ll='ls -alF'
24alias la='ls -A'
25alias l='ls -CF'
26
27# alias
28alias n='nvim'
29alias t='tmux'
30alias c='calcurse-caldav && calcurse && calcurse-caldav'
31
32# go
33export PATH=$PATH:/usr/local/go/bin
34export GOPATH=$HOME/go
35
36# rust
37export PATH="$HOME/.cargo/bin:$PATH"
38
39# python
40alias python='/usr/bin/python3.6'
41alias pip='/usr/bin/pip3'
42
43export EDITOR=vim