]>
git.wh0rd.org - home.git/blob - .profile.d/aliases.sh
1 alias axine
='xine -A null'
4 #alias bittorrent-curses='bittorrent-curses --max_upload_rate 10'
5 #alias bt='bittorrent-curses --max_upload_rate 10 --save_in . --save_incomplete_in .'
6 alias cdrecord
='cdrecord -vvv -eject driveropts=burnfree'
7 alias duh
='du . --max-depth=1 -h'
8 alias eclipse
='eclipse-3.2 -vmargs -Xmx512m'
10 alias gdb
='gdb --quiet'
11 alias gdbtui
='gdbtui --quiet'
12 alias nohist
='export HISTFILE=/dev/null'
14 if command -v elinks
>/dev
/null
; then
15 alias links
='elinks -default-mime-type text/html'
17 elif command -v lynx
>/dev
/null
; then
18 alias lynx
='lynx -nopause -accept_all_cookies -use_mouse'
20 alias minicom
='minicom -w -c on'
21 alias nslookup='nslookup -sil'
23 alias p1d
='patch -p1 --dry-run'
24 alias p1dr
='patch -p1 --dry-run -R'
25 alias p1r
='patch -p1 -R'
26 alias quake4
='quake4 +set s_driver oss'
27 alias rrsync
='rsync -Hav --inplace --progress'
29 sss
() { aspell
-a <<<"$*"; }
30 sdisp
() { sudo
-u smriti sh
-c 'export DISPLAY=:0; xset s reset; exec "$0" "$@"' "$@" ; }
31 smplayer
() { sdisp mplayer
"$@" ; }
32 smpv
() { sdisp mpv
"$@" ; }
33 svlc
() { sdisp vlc
"$@" ; }
34 svnc
() { sdisp x11vnc
-q -nopw ; }
35 sweb
() { sdisp google-chrome-beta
"$@" ; }
36 sxdg
() { sdisp xdg-open
"$@" ; }
40 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'
43 # These guys keep changing their CLI because they hate their users.
54 case $
(command ${cmd} --version) in
58 --PromptManager.in_template
='>>> '
59 --PromptManager.out_template
=''
60 --PromptManager.justify
=False
65 command ${cmd} "${args[@]}" "$@"
67 ipython
() { _ipython
${FUNCNAME}; }
68 ipython2
() { _ipython
${FUNCNAME}; }
69 ipython3
() { _ipython
${FUNCNAME}; }
72 local adk
=/usr
/local
/src
/android
/adk
/current
/sdk
73 PATH
+=":${adk}/tools:${adk}/platform-tools"
77 if [[ $# -eq 0 ]] ; then
79 elif [[ $# -eq 1 && $1 == "--" ]] ; then
87 if [[ $# -eq 1 ]] ; then
90 command dirs "$1" |
& tail -1
91 command cd "$1" |
& tail -1
104 set -- "$(dirs "+${1:1}")"
109 if command cd "$@" ; then
110 pushd -n "${PWD}" >/dev
/null
114 if [[ $# -gt 1 ]] ; then
115 # The `cd` above should have shown an error message for us.
116 local arg first_arg
="$1"
117 while [[ $# -gt 0 ]] ; do
120 if [[ -d ${arg} ]] ; then
121 if [[ $# -gt 0 ]] ; then
122 printf 'cd: remaining: %s\n' "$@" >&2
124 printf 'cd: entering: %s\n' "${arg}" >&2
128 printf 'cd: skipping: %s\n' "${arg}" >&2
131 # If we're still here, then we didn't cd anywhere.
132 echo "cd: cwd is unchanged!" >&2
138 alias cd='cd_history'
140 if [[ ${TERM} != "dumb" ]] ; then
141 export GREP_COLORS
=ne
#470810
142 alias grep='grep --colour=auto -d skip'
143 alias ls='ls --color=auto'
149 -e '/^new file mode /d' \
153 -e '/^retrieving/d' \
155 -e '/^Files .* differ$/d' \
156 -e '/^Binary files .* differ$/d' \
158 -e '/^Common subdirectories/d' \
159 -e '/^deleted file mode [0-9]*$/d' \
160 -e '/^+++/s:\t.*::' \
161 -e '/^---/s:\t.*::' \
173 [[ $# -gt 0 ]] && set -- "$@" -i
174 eval sed \"\$@
\" $
(printf -- ' -e "s|\&%s;|%q|g"' "${a[@]}")