-
Notifications
You must be signed in to change notification settings - Fork 1
/
.shrc
50 lines (42 loc) · 1.47 KB
/
.shrc
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
# Path
[[ -d /opt/local/bin ]] && export PATH=/opt/local/bin:$PATH
[[ -d /opt/local/sbin ]] && export PATH=/opt/local/sbin:$PATH
[[ -d /usr/local/bin ]] && export PATH=/usr/local/bin:$PATH
[[ -d ~/bin ]] && export PATH=$HOME/bin:$PATH
[[ -d ~/.rbenv ]] && export PATH=$HOME/.rbenv/bin:$PATH
[[ -d /usr/local/go/bin ]] && export PATH=/usr/local/go/bin:$PATH
[[ -d $GOPATH ]] && export PATH=$GOPATH/bin:$PATH
[[ -d ~/.cargo/bin ]] && export PATH=~/.cargo/bin:$PATH
# System configuration
export DOTFILES=~/.dotfiles
export EDITOR="$([[ -x $(which nvim) ]] && echo 'nvim' || echo 'vim')"
export VISUAL=$EDITOR
export PAGER="less -FiRswX"
export MANPAGER=$PAGER
export GOPATH=~/go
export RUST_SRC_PATH=~/projects/rust/src
# export CARGO_HOME=~/.cargo
export RIPGREP_CONFIG_PATH=~/.ripgreprc
# Make openssl work on a mac
# http://22ideastreet.com/debug/smtp-rb14-bug-segmentation-fault
export RUBYOPT="-ropenssl"
# History
HISTFILE=~/.history # where to save history
HISTSIZE=SAVEHIST=10000 # save last 10000 commands
# Aliases
if [[ $(uname) == 'Linux' ]]; then
LS_COMMON="--color=auto"
elif [[ $(uname) == 'Darwin' ]]; then
LS_COMMON="-Gh"
fi
test -n "$LS_COMMON" && alias ls="command ls $LS_COMMON"
alias ll="ls -Glh"
alias la="ls -Gla"
alias g="git"
alias v="vagrant"
alias a="ansible"
alias ap="ansible-playbook"
alias c="cargo"
CDPATH=$CDPATH:~/p
# Clear local DNS cache on OSX
alias clear-dns="sudo killall -HUP mDNSResponder"