-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc-windows
executable file
·129 lines (109 loc) · 2.89 KB
/
.bashrc-windows
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
#!/usr/bin/env bash
function lw () {
cygpath -alw "$@"
}
function SetPath()
{
#set up CLASSPATH
unset CLASSPATH
for x in ~/system-config/bin/classpath/*.jar; do
if test -f "$x"; then
CLASSPATH="$CLASSPATH":"$x"
fi
done
CLASSPATH="$CLASSPATH":.
CLASSPATH="${CLASSPATH:1}"
export CLASSPATH="`cygpath -w -p \"$CLASSPATH\"`"
}
function cmd()
{
if [[ -z "$1" ]]; then
of cmd.exe
elif [[ -d "$1" ]]; then
(cd "$1"; of cmd.exe)
elif [[ -d "`dirname \"$1\"`" ]]; then
(cd "`dirname \"$1\"`"; of cmd.exe)
else
echo cmd: no such file or directory "$1"
fi
}
function of()
{
if test "$(lc ${1##*.})" = msi -a -e "$1"; then
chmod a+rx "$1"
fi
if test -e "$1"; then
cygstart "$@"
return
fi
if which "$1" >/dev/null 2>&1; then
if [[ "$1" == of ]]; then
local file=`which cygstart`
else
local file="`which \"$1\"`"
fi
shift
cygstart "$file" "$@"
else
cygstart "$@"
fi
}
function svn-check()
{
svn st --no-ignore|grep '^\?'|grep '\.cpp$\|\.h$\|\.c$' -i
}
function dict()
{
dict.exe -v 2>/dev/null "$@"|iconv -f UTF-8 -t GBK
}
function llocate() {
locateEmacs.sh "$@"|sed -e 's/^/"/; s/$/"/'
}
function ccd()
{
local dir=`getclip`
cd "$dir"
}
export EDITOR=emacsedit.sh
# export PYTHON_INCLUDE='c:\python25\include'
# export PYTHON_LIB='c:\python25\libs\python25.lib'
export ADBHOST=192.168.100.2
export ADB_HOST=192.168.100.2
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export DISPLAY=${DISPLAY:-:0}
export JRE_HOME=C:/PROGRA~1/Java/jre6
alias wpwd='cygpath -alw .; pwd|sed -e "s!/!.!g"; echo'
alias perl='/bin/perl'
alias or=regopen.py #open registry
alias mplayer="'/cygdrive/c/Program Files/MPlayer for Windows/MPlayer.exe'"
alias regrep.py='regrep.py 2>/dev/null'
alias regsub.py='regsub.py 2>/dev/null'
alias ps='ps aux -W'
alias locate=llocate
alias pdfnup='cygexec pdfnup'
alias virus='clamscan --database="d:\profiles\All Users\.clamwin\db" --recursive'
alias vcenv6='. ~/system-config/bin/windows/vcenv6.sh'
alias wdkenv='. ~/system-config/bin/windows/wdkenv.sh'
alias repo='PATH=/bin:$PATH repo'
if test -e ~/.config/system-config/.bashrc-path; then
. ~/.config/system-config/.bashrc-path
SetPath
unset SetPath
fi
function complete_skeleton_words() {
local cur cmd
local IFS=$'\n'
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
cmd="${COMP_WORDS[0]}"
COMPREPLY=( $(skeleton_compgen_word.pl \
-d '\n' -- \
"$(cat ~/system-config/doc/.bash_completion_words.$(basename "$cmd"))" \
"$cur")
)
}
complete -o default -F complete_skeleton_words ps.pl
export COMMONPROGRAMFILES=${COMMONPROGRAMFILES:-'C:\Program Files\Common Files'}
export PROGRAMFILES=${PROGRAMFILES:-'C:\Program Files'}
return 0