-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
60 lines (53 loc) · 1.05 KB
/
bashrc
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
# Set terminfo
export TERM=xterm-256color
# Vim bind
if which vim > /dev/null; then
export EDITOR=vim
fi
# History
HISTFILE=$HOME/.bash_history
HISTSIZE=100000
SAVEHIST=100000
# Prompts
PROMPT_COLOR_LEFT='69'
PROMPT_COLOR_USER='69'
PROMPT_COLOR_HOSTNAME='69'
PROMPT_COLOR_PWD='220'
# When root
if [ `id -u` -eq 0 ]
then
PROMPT_COLOR_LEFT='red'
PROMPT_COLOR_USER='red'
PROMPT_COLOR_HOSTNAME='red'
fi
PROMPT="%F{${PROMPT_COLOR_LEFT}}[%n-%*]%#%f "
RPROMPT="[%F{${PROMPT_COLOR_HOSTNAME}}%m%f:%F{${PROMPT_COLOR_PWD}}%~%f]"
# Aliases
alias c='cd'
alias l='ls'
alias ll='ls -lh'
alias la='ls -a'
alias lla='ls -lha'
alias lal='ls -lha'
alias v='vim'
alias vr='vim -R'
alias vimr='vim -R'
alias g='git'
alias be='bundle exec'
alias tm='tmux'
alias reload='source $HOME/.bashrc'
if which colordiff &> /dev/null
then
alias diff='colordiff -u'
fi
# OS-specific configuration
case $OSTYPE in
darwin*)
export LSCOLORS=gxfxcxdxbxegedabagacad
alias ls='ls -G';;
linux-gnu)
export LS_COLORS='di=00;36:ln=00;35'
alias ls='ls --color=auto';;
esac
# Run
ls