-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc-aliases
executable file
·66 lines (58 loc) · 2.5 KB
/
.bashrc-aliases
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
#!/usr/bin/env bash
alias less='less -i'
alias arping='sudo arping'
alias quilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
alias dquilt="quilt --quiltrc=${HOME}/.quiltrc-dpkg"
alias aptitude='sudo aptitude'
alias umount='command sudo umount'
alias mplayer='mplayer -heartbeat-cmd "xscreensaver-command -deactivate"'
alias mplayer=mplayer.x
alias svngdiff='svn diff --diff-cmd ~/system-config/bin/svntkdiff'
alias ls='ls -hF --color=tty --show-control-chars --block-size=1' # classify files in colour
alias dir='ls --color=auto --format=vertical --show-control-chars'
alias vdir='ls --color=auto --format=long --show-control-chars'
alias ll='ls -l --show-control-chars' # long list
alias la='ls -A --show-control-chars' # all but . and ..
alias l='ls -CFl --show-control-chars --block-size=1' #
alias minicom='hint "注意:USB 不要插反!有些 USB 转串口线插反就没有 Log!";minicom -w -D /dev/ttyUSB*'
jcd() {
# http://build1:8080/job/Daily-surabaya-dev-colombo-Vuserdebug-Onone/6/console
local task=$(echo "$1"|perl -npe 's,.*/job/(.*?)/.*,$1,')
if echo "$1" | grep -P "\Q$task\E/(\d+|lastFailedBuild)/([^/]*=[^/]*)" -q; then
set -- "$(echo "$1" | perl -pe "s[(\Q$task\E)/(\d+|lastFailedBuild)/([^/]*=[^/]*)]["'$1/$3/$2]')"
fi
if echo "$1" | grep -P "\Q$task\E/([^/]*=[^/]*)/(\d+|lastFailedBuild)" -q; then
config=$(echo "$1" | perl -ne "print \$1 if m,\Q$task\E/([^/]*=[^/]*)/(\d+|lastFailedBuild),");
build=$(echo "$1"|perl -npe "s[.*/\Q$task/$config\E/(\d+|lastFailedBuild).*][\$1]");
cd jobs
cd $task/configurations/$(for x in $(echo $config | tr ',' ' '); do echo -n axis-${x%=*}/${x#*=}/; done)/builds/$build
else
local build=$(echo "$1"|perl -npe "s,.*/\Q$task\E/(\d+|lastFailedBuild).*,\$1,")
cd jobs
cd $task/builds/$build
fi
}
mount() {
if test $# = 0; then
command mount
else
sudo mount "$@"
fi
}
if test -e ~/.local-config/.bashrc-aliases; then
. ~/.local-config/.bashrc-aliases
fi
alias e='e --warning'
if test -e ~/.config/system-config/vim-is-evil; then
alias vi=e
alias vim=e
if test "$(lsb_release -cs)" = trusty; then
export PATH=~/external/local/emacs25u/bin:$PATH
elif test -d ~/external/local/emacs25-$(lsb_release -c -s); then
export PATH=~/external/local/emacs25-$(lsb_release -c -s)/bin:$PATH
fi
fi
SETX() {
set -x;
export SHELLOPTS
}