]>
Commit | Line | Data |
---|---|---|
1afdf944 | 1 | alias axine='xine -A null' |
de7f2c38 | 2 | alias b='bzr' |
5b61754d | 3 | alias bc='bc -q' |
1afdf944 MF |
4 | #alias bittorrent-curses='bittorrent-curses --max_upload_rate 10' |
5 | #alias bt='bittorrent-curses --max_upload_rate 10 --save_in . --save_incomplete_in .' | |
83b07a3a | 6 | alias cdrecord='cdrecord -vvv -eject driveropts=burnfree' |
5b61754d | 7 | alias duh='du . --max-depth=1 -h' |
63d15f58 | 8 | alias eclipse='eclipse-3.2 -vmargs -Xmx512m' |
ca0cd585 | 9 | alias g='git' |
5b61754d | 10 | alias gdb='gdb --quiet' |
1afdf944 | 11 | alias gdbtui='gdbtui --quiet' |
8a844016 | 12 | alias nohist='export HISTFILE=/dev/null' |
d85737d7 | 13 | alias kpdf='okular' |
14031d68 | 14 | if command -v elinks >/dev/null ; then |
78ddcb31 MF |
15 | alias links='elinks -default-mime-type text/html' |
16 | alias lynx=links | |
14031d68 MF |
17 | elif command -v lynx >/dev/null ; then |
18 | alias lynx='lynx -nopause -accept_all_cookies -use_mouse' | |
19 | fi | |
5b61754d MF |
20 | alias minicom='minicom -w -c on' |
21 | alias nslookup='nslookup -sil' | |
d80dd902 MF |
22 | alias p1='patch -p1' |
23 | alias p1d='patch -p1 --dry-run' | |
24 | alias p1dr='patch -p1 --dry-run -R' | |
25 | alias p1r='patch -p1 -R' | |
1afdf944 | 26 | alias quake4='quake4 +set s_driver oss' |
aa909367 | 27 | alias rrsync='rsync -Hav --inplace --progress' |
5b61754d | 28 | alias s='aspell -a' |
375dc529 | 29 | sss() { aspell -a <<<"$*"; } |
598dd9e3 | 30 | smplayer() { sudo -u smriti sh -c 'export DISPLAY=:0; xset s reset; exec mplayer "$@" >/dev/null 2>&1' sh "$@" ; } |
b598da0c | 31 | svlc() { sudo -u smriti sh -c 'export DISPLAY=:0; xset s reset; exec vlc "$@" >/dev/null 2>&1' sh "$@" ; } |
e034a752 | 32 | svnc() { sudo -u smriti sh -c 'export DISPLAY=:0; xset s reset; exec x11vnc -q -nopw' ; } |
1c9edcf2 | 33 | alias trc=transmission-remote-cli |
1afdf944 | 34 | alias xine='xine -l' |
5b61754d | 35 | |
276cf0d7 | 36 | alias wol-vapier='wakeonlan -i 192.168.1.255 00:25:22:64:19:79; wakeonlan -i 192.168.0.255 00:25:22:64:19:79' |
145ec29a | 37 | |
22072cde MF |
38 | _ipython() { |
39 | # These guys keep changing their CLI because they hate their users. | |
40 | local cmd=$1; shift | |
41 | local args=( | |
42 | --no-banner | |
43 | --no-confirm-exit | |
44 | --pdb | |
45 | --nosep | |
46 | --term-title | |
47 | --pprint | |
48 | ) | |
49 | ||
50 | case $(command ${cmd} --version) in | |
51 | 0*) ;; | |
52 | [123]*) | |
53 | args+=( | |
54 | --PromptManager.in_template='>>> ' | |
55 | --PromptManager.out_template='' | |
56 | --PromptManager.justify=False | |
57 | ) | |
58 | ;; | |
59 | esac | |
60 | ||
61 | command ${cmd} "${args[@]}" "$@" | |
62 | } | |
63 | ipython() { _ipython ${FUNCNAME}; } | |
64 | ipython2() { _ipython ${FUNCNAME}; } | |
65 | ipython3() { _ipython ${FUNCNAME}; } | |
66 | ||
019bffbb MF |
67 | adk_path() { |
68 | local adk=/usr/local/src/android/adk/current/sdk | |
69 | PATH+=":${adk}/tools:${adk}/platform-tools" | |
70 | } | |
71 | ||
06ac7c77 MF |
72 | pd() { |
73 | if [[ $# -eq 0 ]] ; then | |
74 | popd | |
cf68f8b6 MF |
75 | elif [[ $# -eq 1 && $1 == "--" ]] ; then |
76 | dirs -v | |
06ac7c77 MF |
77 | else |
78 | pushd "$@" | |
79 | fi | |
80 | } | |
81 | ||
cf68f8b6 MF |
82 | cd_history() { |
83 | if [[ $# -eq 1 ]] ; then | |
84 | case $1 in | |
85 | -h) | |
86 | command dirs "$1" |& tail -1 | |
87 | command cd "$1" |& tail -1 | |
88 | return | |
89 | ;; | |
90 | --help) | |
91 | command dirs "$1" | |
92 | command cd "$1" | |
93 | return | |
94 | ;; | |
95 | -[clpv]) | |
96 | command dirs "$1" | |
97 | return | |
98 | ;; | |
99 | -[0-9]*) | |
100 | set -- "$(dirs "+${1:1}")" | |
101 | ;; | |
102 | esac | |
103 | fi | |
104 | if command cd "$@" ; then | |
105 | pushd -n "${PWD}" >/dev/null | |
106 | fi | |
107 | } | |
108 | alias cd='cd_history' | |
109 | ||
77ee95d3 | 110 | if [[ ${TERM} != "dumb" ]] ; then |
aa909367 | 111 | export GREP_COLORS=ne #470810 |
4c1fde46 | 112 | alias grep='grep --colour=auto -d skip' |
77ee95d3 MF |
113 | alias ls='ls --color=auto' |
114 | fi | |
115 | ||
5b61754d | 116 | scrub_patch() { |
4c1fde46 MF |
117 | sed -i \ |
118 | -e '/^index /d' \ | |
5b61754d | 119 | -e '/^new file mode /d' \ |
4c1fde46 | 120 | -e '/^Index:/d' \ |
5b61754d MF |
121 | -e '/^=========/d' \ |
122 | -e '/^RCS file:/d' \ | |
123 | -e '/^retrieving/d' \ | |
124 | -e '/^diff/d' \ | |
125 | -e '/^Files .* differ$/d' \ | |
1c9edcf2 | 126 | -e '/^Binary files .* differ$/d' \ |
5b61754d MF |
127 | -e '/^Only in /d' \ |
128 | -e '/^Common subdirectories/d' \ | |
4c1fde46 MF |
129 | -e '/^deleted file mode [0-9]*$/d' \ |
130 | -e '/^+++/s:\t.*::' \ | |
131 | -e '/^---/s:\t.*::' \ | |
132 | "$@" | |
5b61754d MF |
133 | } |
134 | ||
1afdf944 | 135 | scrub_html() { |
e0db24bd MF |
136 | local a=( |
137 | 'lt' '<' | |
138 | 'gt' '>' | |
139 | 'nbsp' ' ' | |
140 | 'amp' '&' | |
141 | 'quot' '"' | |
142 | ) | |
143 | [[ $# -gt 0 ]] && set -- "$@" -i | |
144 | eval sed \"\$@\" $(printf -- ' -e "s|\&%s;|%q|g"' "${a[@]}") | |
5b61754d | 145 | } |