-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc.conf
executable file
·139 lines (122 loc) · 3.51 KB
/
bashrc.conf
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
PS1='\h:\w\$ '
PS2='> '
export EDITOR
# ------------------------
# path
# ------------------------
#PATH=.
#PATH=$PATH:/cygdrive/d/home/cygwin/bin
#PATH=$PATH:/usr/bin
#PATH=$PATH:/cygdrive/c/Program\ Files/Java/jdk1.5.0_04/bin
#alias
alias ls='ls --color=auto'
alias ls='dir'
set bell-style none
export LANG=C
export LC_CTYPE=iso-8859-1
export GIT_PAGER=""
# ------------------------
export GIT_PAGER=""
alias 'SVNDIFF'='svn diff -x "-p"'
# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x
export COCOS_CONSOLE_ROOT=/home/jack/source/cocos2dx/cocos2d-x-3.2alpha0/tools/cocos2d-console/bin
export PATH=$COCOS_CONSOLE_ROOT:$PATH
export LD_LIBRARY_PATH=/home/jack/svnroot/VGame/trunk/server/proto
ulimit -c unlimited
PATH=/home/jack/svnroot/VGame2/server:$PATH
export GOPATH=~/gocode
export GOROOT_BOOTSTRAP=~/gitroot/go
export PATH=$PATH:~/gocode/bin
alias gobuild="go build -gcflags \"-N -l\""
#if [ -n $INSIDE_EMACS ]; then
# export TERM=xterm-256color
#fi
# export CC=/usr/local/bin/gcc
# export CXX=/usr/local/bin/g++
# alias pushall="git push origin && git push origin2"
pushall(){
pushall=(`git remote`)
# echo "$pushall"
for remote in ${pushall[*]}
do
git push ${remote}
done
}
picbg()
{
t="1"
if [ $# -gt 0 ]
then
t=$1
fi
printf "\e]11;_~/${t}.jpg,50\e\\"
}
setproxy() {
if [ -z $1 ]; then
unset http_proxy;
unset https_proxy;
unset ftp_proxy;
unset all_proxy;
unset HTTP_PROXY;
unset HTTPS_PROXY;
unset FTP_PROXY;
unset ALL_PROXY;
else
export http_proxy=$1;
export https_proxy=$1;
export ftp_proxy=$1;
export all_proxy=$1;
export HTTP_PROXY=$1;
export HTTPS_PROXY=$1;
export FTP_PROXY=$1;
export ALL_PROXY=$1;
fi
}
source /usr/share/autojump/autojump.sh
export NVM_DIR="/home/jack/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
#export BMKNAME=${HOME}/bmk/memcached.bmk
#export BMKNAME=${HOME}/bmk/vgame_trunk.bmk
#export BMKNAME=${HOME}/bmk/skynet.bmk
alias sudo='sudo -p "[sudo] password for %u: "'
alias b="cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ."
alias cmake="cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
alias rmcmake="rm -rf CMakeCache.txt CMakeFiles"
alias temacs="TERM=xterm-t1 emacs"
alias temacs2="TERM=xterm-t1 HOME=/home/jack2 emacs"
alias ttmux="TERM=xterm-t1 tmux"
alias mycscope="sh ~/.emacs.conf/mycscope.sh"
alias ana="source /opt/anaconda/bin/activate"
export ENCAOPT="-L zh"
export GIT_PAGER=""
export EDITOR="emacsclient"
export LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH}
export ASAN_OPTIONS=detect_leaks=true:detect_stack_use_after_return=true:check_initialization_order=true:log_path=./memerr.log
export GTAGSLABEL='native-pygments'
export GTAGSCONF=/usr/local/share/gtags/gtags.conf
### https://github.com/rupa/z
source ~/.z.sh
vterm_printf(){
if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ] ); then
# Tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$1"
else
printf "\e]%s\e\\" "$1"
fi
}
vterm_prompt_end(){
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)"
}
PS1=$PS1'\[$(vterm_prompt_end)\]'
vterm_cmd() {
local vterm_elisp
vterm_elisp=""
while [ $# -gt 0 ]; do
vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")"
shift
done
vterm_printf "51;E$vterm_elisp"
}