-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc
More file actions
executable file
·56 lines (46 loc) · 1.2 KB
/
Copy pathbashrc
File metadata and controls
executable file
·56 lines (46 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# prompt
function git_dirty() {
(git status --porcelain 2>/dev/null | grep '.*')>/dev/null && echo '*'
}
function git_branch() {
git branch --no-color 2>/dev/null | sed '/^[^*]/d' | sed "s/\* \(.*\)/[\1$(git_dirty)] /"
}
normal="\[\e[0m\]"
green="\[\e[32m\]"
violet="\[\e[35m\]"
[[ -n $SSH_TTY ]] && green="$violet"
PS1="$green\$(git_branch)\w $normal"
# aliases
[ "$HOSTNAME" == "dinghy" ] && alias vim='nvim'
alias q='exit'
alias v='vim'
alias g='git'
alias ls='ls --color=auto'
alias rip='abcde -d /dev/sr0 -o flac'
alias gcc='gcc -std=c99'
alias vih='vim +h +on'
alias cmus='tmux new -As cmus cmus'
alias feh='feh -.'
alias pdflatex='pdflatex -halt-on-error'
# completion for g
source /usr/share/git/completion/git-completion.bash
__git_complete g __git_main
# include smaller tools and completions
source ~/tools/tools.sh
# settings
set -o vi
export HISTIGNORE="&"
shopt -s histverify
shopt -s lithist
export PATH+=:~/tools
export PATH+=:~/.gem/ruby/2.1.0/bin
export PATH+=:~/go/bin
export PATH+=:/opt/android-sdk/tools/
export EDITOR="vim"
export PAGER="less"
export GOPATH=~/go
export GOMAXPROCS=4
export LESS="-R"
eval $(lesspipe.sh)