]> git.wh0rd.org - home.git/blob - .profile.d/aliases.sh
dont set color aliases for dumb terminals
[home.git] / .profile.d / aliases.sh
1 [[ $- != *i* ]] && return
2
3 alias axine='xine -A null'
4 alias bc='bc -q'
5 #alias bittorrent-curses='bittorrent-curses --max_upload_rate 10'
6 #alias bt='bittorrent-curses --max_upload_rate 10 --save_in . --save_incomplete_in .'
7 alias duh='du . --max-depth=1 -h'
8 alias eclipse='eclipse-3.2 -vmargs -Xmx512m'
9 alias g='git'
10 alias gdb='gdb --quiet'
11 alias gdbtui='gdbtui --quiet'
12 alias nohist='export HISTFILE=/dev/null'
13 alias kpdf='okular'
14 alias lynx='lynx -nopause -accept_all_cookies -use_mouse'
15 alias minicom='minicom -w -c on'
16 alias nslookup='nslookup -sil'
17 alias quake4='quake4 +set s_driver oss'
18 alias repoman='repoman -q -q'
19 alias rrsync='rsync -av --inplace --progress'
20 alias s='aspell -a'
21 ss() { aspell -a <<<"$*"; }
22 alias xine='xine -l'
23
24 if [[ ${TERM} != "dumb" ]] ; then
25 alias grep='grep --colour=auto'
26 alias ls='ls --color=auto'
27 fi
28
29 grep-svn() { find '(' -wholename '*/.svn' -prune -o -type f -print0 ')' | xargs -0 grep "$@" ; }
30
31 scrub_patch() {
32 sed -i \
33 -e '/^index /d' \
34 -e '/^new file mode /d' \
35 -e '/^Index:/d' \
36 -e '/^=========/d' \
37 -e '/^RCS file:/d' \
38 -e '/^retrieving/d' \
39 -e '/^diff/d' \
40 -e '/^Files .* differ$/d' \
41 -e '/^Only in /d' \
42 -e '/^Common subdirectories/d' \
43 -e '/^+++/s:\t.*::' \
44 -e '/^---/s:\t.*::' \
45 "$@"
46 }
47
48 scrub_html() {
49 sed -i \
50 -e 's:&lt;:<:g' -e 's:&gt;:>:g' \
51 -e 's:&nbsp;::g' -e 's:&amp;:\&:g' \
52 -e 's:&quot;:":g' \
53 "$@"
54 }