forked from zetavg/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_shell_profile
More file actions
executable file
·175 lines (140 loc) · 3.34 KB
/
_shell_profile
File metadata and controls
executable file
·175 lines (140 loc) · 3.34 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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
####################################
# neson's shell profile 2016-11-08 #
####################################
## Add `source "$HOME/.shell_profile"` to the main .profile or .bash_profile ##
# SET DEFAULT CONSTANTS
export DEFAULT_NVM_VERSION='5.5.0'
export DEFAULT_RVM_VERSION='2.3.1'
# PATH
PATH="$HOME/.bin:$PATH"
PATH="$HOME/.bin/script:$PATH"
PATH="$HOME/.sbin:$PATH"
PATH="$HOME/.sbin/script:$PATH"
# LOAD CONFIG SCRIPT
# if type "git" > /dev/null 2> /dev/null; then
# if type "git_config" > /dev/null 2> /dev/null; then
# git_config
# fi
# fi
# ALIAS
alias repro='source $HOME/.shell_profile'
alias cls='cd;clear;test -e /etc/motd and cat /etc/motd;repro'
alias bye='exit'
alias l='ls -CF'
alias ll='ls -lFh'
if [[ `uname` == "Darwin" ]]; then
alias lll='ls -alFh -G | less'
else
alias lll='ls -alFh --color=always | less'
fi
alias la='ls -alFh'
alias lz='ls -lSrh'
alias lt='ls -ltrh'
alias lx='ls -lXBh'
alias up='cd ../'
alias cg="newgrp"
alias j='jobs'
alias startt='tmux new -s default'
alias tt='tmux attach -t default'
alias ns='screen -S'
alias rs='screen -r -x'
alias startscr='screen -S scr'
alias scr='screen -x scr'
alias nw='screen -X screen -t'
alias s='screen -X select'
alias roots='screen -X screen -t root 10 su'
alias sudosus='screen -X screen -t root 10 sudo su'
alias tops='screen -X screen -t top 9 top'
alias ptts='screen -X screen -t BBS 8 ssh bbsu@ptt.cc'
alias zshs='screen -X screen -t zsh zsh'
alias vis='screen -X screen -t vim vim'
alias gs='git status'
alias gss='git status --short --branch'
alias gsm='git status | more'
alias R='rails'
alias RR='rails'
alias RN='react-native'
alias st='subl'
alias ss='subl'
alias gt='gittower'
alias trr='touch tmp/restart.txt'
alias ttr='touch tmp/restart.txt'
alias tdl='tail -f log/development.log'
alias geeknote='python $HOME/.bin/geeknote/geeknote.py'
alias gnsync='python $HOME/.bin/geeknote/gnsync.py'
alias pg8='ping 8.8.8.8'
alias ptt='ssh bbsu@ptt.cc'
# COMMANDS FOR COMPRESS AND DECOMPRESSESING
# Usage:
# mk* OutputFileName.* InputDirName
# do* InputFileName
# un* InputFileName.*
#
# tar
alias mktar='tar cvf'
alias untar='tar xvf'
# gz
alias dogz='gzip'
alias ungz='gzip -d'
# tar.gz
alias mktar.gz='tar zcvf'
alias untar.gz='tar zxvf'
# bz
alias mkbz='echo "no mkbz"'
alias unbz='bzip2 -d'
# tar.bz
alias mktar.bz='echo "no mktar.bz"'
alias untar.bz='tar jxvf'
# bz2
alias dobz2='bzip2 -z'
alias unbz2='bzip2 -d'
# tar.bz2
alias mktar.bz2='tar jcvf'
alias untar.bz2='tar jxvf'
# tgz
alias mktgz='tar zcvf'
alias untgz='tar zxvf'
# tar.tgz
alias mktar.tgz='tar zcvf'
alias untar.tgz='tar zxvf'
# xz
alias mkxz='xz -z'
alias unxz='xz -d'
# tar.xz
alias mktar.xz='tar Jcvf'
alias untar.xz='tar Jxvf'
# Z
alias doZ='compress'
alias unZ='uncompress'
# tar.Z
alias mktar.Z='tar Zcvf'
alias untar.Z='tar Zxvf'
# 7z
alias mk7z='7z a'
alias un7z='7z x'
# rar
alias mkrar='rar'
alias unrar='rar e'
# lha
alias mklha='lha -a'
alias unlha='lha -e'
# FUNCTIONS
function mkcd() {
mkdir "$1"
cd "$1"
}
# LOAD ENVIRMENT SPECIFIC PROFILES
if [ -f "$HOME/.profile_other" ]; then
if [ -n "$FISH_VERSION" ]; then
bass source "$HOME/.profile_other"
else
source "$HOME/.profile_other"
fi
fi
if [ -f "$HOME/.profile_after_initialized" ]; then
if [ -n "$FISH_VERSION" ]; then
bass source "$HOME/.profile_after_initialized"
else
source "$HOME/.profile_after_initialized"
fi
fi