-
Notifications
You must be signed in to change notification settings - Fork 3
/
sen.zsh
51 lines (45 loc) · 1.44 KB
/
sen.zsh
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
# This is a very personal setting, maybe few people like it, so I config it separatedly.
#alias
if which nvim>/dev/null 2>&1; then
alias vi='nvim'
export EDITOR='nvim'
elif which vim>/dev/null 2>&1; then
alias vi='vim'
export EDITOR='vim'
fi
export GO111MODULE=auto
export GOPROXY=https://goproxy.io
case $OSTYPE in
cygwin*)
# Go environment
export PATH=$PATH:/cygdrive/c/go/bin
GOBASEPATH="$HOME/GoWorkSpace"
GOPATH_WIN=`cygpath -a -w $GOBASEPATH`
GOBIN_WIN=`cygpath -a -w $GOBASEPATH/bin`
export GOPATH="$GOPATH_WIN"
export GOBIN="$GOBIN_WIN"
export PATH="$PATH:$GOBASEPATH/bin"
;;
linux*)
# Go environment
[ -s "/usr/local/go" ] && export PATH=$PATH:/usr/local/go/bin
GOBASEPATH="$HOME/GoWorkSpace"
export GOPATH="$GOBASEPATH"
export PATH="$PATH:$GOBASEPATH/bin"
if [ -d "/usr/local/maven" ]; then
MAVEN_HOME=/usr/local/maven
export PATH=$PATH:${MAVEN_HOME}/bin
fi
;;
darwin*)
# Go environment
[ -s "/usr/local/go" ] && export PATH=$PATH:/usr/local/go/bin
GOBASEPATH="$HOME/GoWorkSpace"
export GOPATH="$GOBASEPATH"
export PATH="$PATH:$GOBASEPATH/bin"
;;
esac
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
SESSION_NAME="remotetmux"
tmux attach-session -t $SESSION_NAME || tmux new-session -s $SESSION_NAME
fi