Repository navigation
Expand file tree
/
Copy pathbash_profile
More file actions
80 lines (62 loc) · 1.7 KB
/
Copy pathbash_profile
File metadata and controls
80 lines (62 loc) · 1.7 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# this is slow
# Add homebrew bash completion if it exists
if [ -x "$(command -v brew)" ]; then
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
fi
# Turn off homebrew analytics
export HOMEBREW_NO_ANALYTICS=1
# Ensure homebrew api token isn't set
unset HOMEBREW_GITHUB_API_TOKEN
# Color bash prompt
#export PS1="\[\e[1;30;47m\]\h:\W \u\$\[\e[0m\] "
# Color bash prompt
PS1_PWD_MAX=15
__pwd_ps1() { echo -n $PWD | sed -e "s|${HOME}|~|" -e "s|\(/[^/]*/\).*\(/.\{${PS1_PWD_MAX}\}\)|\1...\2|"; }
GIT_PS1_SHOWDIRTYSTATE=1
PS1='\[\033[01;34m\]$(__pwd_ps1)$(__git_ps1 " \[\033[01;31m\](%s)")$\[\033[00m\] '
# Add cabal install
#export PATH=$HOME/.cabal/bin:$PATH
# Add go path
export GOPATH=$HOME/dev/go
export PATH=$PATH:$GOPATH/bin
export GOBIN=$GOPATH/bin
export PATH=/usr/local/go/bin:$PATH
# terminal colors
export TERM=xterm-256color
# ansible inventory file
export ANSIBLE_INVENTORY=~/dev/ansible/ansible_inventory
# ignore duplicates in history
export HISTCONTROL=ignoredups
# why yes I do use Go
export GO15VENDOREXPERIMENT=1
###
# aliases
###
# Add shortened tmux new command
alias tmn='tmux new -s $1'
alias tml='tmux ls'
# Add tmux bash completion
alias tma='tmux attach -t $1'
if [ -f /usr/local/etc/bash_completion.d/tma ]; then
. /usr/local/etc/bash_completion.d/tma
fi
# Alias ll
alias ll='ls -alh --color=auto'
# cd lists directory contents
function cd {
builtin cd "$@" && ll
}
# Color grep
alias grep='grep --color=auto'
# Go aliases
alias gb='go build'
alias gt='go test'
alias gtv='go test -v'
alias gtvr='go test -v -race'
alias cdgo='cd ~/dev/go/src/github.com/ifo'
# nvim
alias n='nvim'
# fzf
source /usr/share/doc/fzf/examples/key-bindings.bash