-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.shellrc
132 lines (118 loc) · 3.2 KB
/
.shellrc
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
alias reload_shellrc='source ~/.shellrc'
if [[ $OSTYPE == darwin* ]]; then
alias ls='ls -GFh'
alias o='open'
else
alias ls='ls --color -hF --show-control-chars'
alias o='gnome-open'
alias open='gnome-open'
fi
alias aga='ag -a'
alias be='bundle exec'
alias dc='docker-compose'
alias dm='docker-machine'
alias de='deploy exec $DOCKER_MACHINE_NAME'
alias diff='colordiff'
alias g='git'
alias gf='git-flow'
alias gvi='gvim --noplugin'
alias grep='grep --color'
alias irb='pry'
alias less='less -r'
alias rgc='rvm gemset create'
alias rgl='rvm gemset list'
alias rgu='rvm gemset use'
alias r='rails'
alias rm='rm -v'
alias sudo='sudo -E'
alias vi='vim --noplugin'
alias wget='wget --no-check-certificate'
alias psg='ps aux | grep'
alias dstart='sudo systemctl start'
alias drestart='sudo systemctl restart'
alias dstop='sudo systemctl stop'
alias wicd='wicd-curses'
alias pacman='pacman --color=auto'
alias pacupg='sudo pacman --color=auto -Syu'
alias pacupgd='sudo pacman --color=auto -Syud'
alias pacin='sudo pacman --color=auto -S'
alias pacins='sudo pacman --color=auto -Up'
alias pacre='sudo pacman --color=auto -R'
alias pacrem='sudo pacman --color=auto -Rns'
alias pacrep='pacman --color=auto -Si'
alias pacreps='pacman --color=auto -Ss'
alias pacloc='pacman --color=auto -Qi'
alias paclocs='pacman --color=auto -Qs'
alias pacupd='sudo pacman --color=auto -Sy && sudo abs'
alias pacinsd='sudo pacman --color=auto -S --nodeps'
alias pacmir='sudo pacman --color=auto -Syy'
alias pacfile='pacman --color=auto -Qo'
alias pacfiles='pacman --color=auto -Qlq'
alias yaoupg='yay -Syu --aur --devel'
alias yaoin='yay -S'
alias yaoins='yay -Up'
alias yaore='yay -R'
alias yaorem='yay -Rns'
alias yaorep='yay -Si'
alias yaoreps='yay -Ss'
alias yaoloc='yay -Qi'
alias yaolocs='yay -Qs'
alias yaoupd='yay -Sy && sudo abs'
alias yaoinsd='yay -S --nodeps'
alias yaomir='yay -Syy'
alias yaoget='yay -G'
alias tmr='tmutil restore ~/TM'
export ANDROID_HOME="$HOME/android-sdk"
export GOPATH="$HOME/go"
export GPG_TTY=$(tty)
export PATH="$HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:/usr/local/sbin:/usr/local/bin:$PATH:$GOPATH/bin"
export PATH=".git/safe/../../bin:.git/safe/../../node_modules/.bin:$PATH"
# Set CDPATH may cause make not works, disable it before make.
export CDPATH='.:~/devel'
if [[ $OSTYPE == darwin* ]]; then
export LANG='en_US.UTF-8'
else
export LC_CTYPE='zh_CN.UTF-8'
fi
export EDITOR='vim'
export RBXOPT="-Xrbc.db=$HOME/.rbx"
if [[ -x `which hub` ]]; then
alias git=hub
fi
if [[ $TERM == xterm ]]
then
export TERM='xterm-256color'
fi
if [[ $TERM == linux ]]
then
export LANG='C'
fi
proxy() {
if [[ $1 == on ]]
then
echo http_proxy turned on
export https_proxy=http://127.0.0.1:6152
export http_proxy=http://127.0.0.1:6152
elif [[ $1 == off ]]
then
echo http_proxy turned off
unset http_proxy
unset https_proxy
else
echo 'Usage: http_proxy [on|off]'
fi
}
dma() {
if [[ $1 == '' ]]
then
docker-machine active
else
eval "$(docker-machine env $2 $1)"
export DEPLOY_ENV="$DOCKER_MACHINE_NAME"
fi
}
dmas() {
dma $1 --swarm
}
[ -f ~/.private_rc ] && . ~/.private_rc
# vim: set ft=sh: