]>
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 smplayer
() { sudo
-u smriti sh
-c 'export DISPLAY=:0; xset s reset; exec mplayer "$@" >/dev/null 2>&1' sh
"$@" ; }
31 smpv
() { sudo
-u smriti sh
-c 'export DISPLAY=:0; xset s reset; exec mpv "$@"' sh
"$@" ; }
32 svlc
() { sudo
-u smriti sh
-c 'export DISPLAY=:0; xset s reset; exec vlc "$@" >/dev/null 2>&1' sh
"$@" ; }
33 svnc
() { sudo
-u smriti sh
-c 'export DISPLAY=:0; xset s reset; exec x11vnc -q -nopw' ; }
34 alias trc
=transmission-remote-cli
37 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'
40 # These guys keep changing their CLI because they hate their users.
51 case $
(command ${cmd} --version) in
55 --PromptManager.in_template
='>>> '
56 --PromptManager.out_template
=''
57 --PromptManager.justify
=False
62 command ${cmd} "${args[@]}" "$@"
64 ipython
() { _ipython
${FUNCNAME}; }
65 ipython2
() { _ipython
${FUNCNAME}; }
66 ipython3
() { _ipython
${FUNCNAME}; }
69 local adk
=/usr
/local
/src
/android
/adk
/current
/sdk
70 PATH
+=":${adk}/tools:${adk}/platform-tools"
74 if [[ $# -eq 0 ]] ; then
76 elif [[ $# -eq 1 && $1 == "--" ]] ; then
84 if [[ $# -eq 1 ]] ; then
87 command dirs "$1" |
& tail -1
88 command cd "$1" |
& tail -1
101 set -- "$(dirs "+${1:1}")"
106 if command cd "$@" ; then
107 pushd -n "${PWD}" >/dev
/null
111 if [[ $# -gt 1 ]] ; then
112 # The `cd` above should have shown an error message for us.
113 local arg first_arg
="$1"
114 while [[ $# -gt 0 ]] ; do
117 if [[ -d ${arg} ]] ; then
118 if [[ $# -gt 0 ]] ; then
119 printf 'cd: remaining: %s\n' "$@" >&2
121 printf 'cd: entering: %s\n' "${arg}" >&2
125 printf 'cd: skipping: %s\n' "${arg}" >&2
128 # If we're still here, then we didn't cd anywhere.
129 echo "cd: cwd is unchanged!" >&2
135 alias cd='cd_history'
137 if [[ ${TERM} != "dumb" ]] ; then
138 export GREP_COLORS
=ne
#470810
139 alias grep='grep --colour=auto -d skip'
140 alias ls='ls --color=auto'
146 -e '/^new file mode /d' \
150 -e '/^retrieving/d' \
152 -e '/^Files .* differ$/d' \
153 -e '/^Binary files .* differ$/d' \
155 -e '/^Common subdirectories/d' \
156 -e '/^deleted file mode [0-9]*$/d' \
157 -e '/^+++/s:\t.*::' \
158 -e '/^---/s:\t.*::' \
170 [[ $# -gt 0 ]] && set -- "$@" -i
171 eval sed \"\$@
\" $
(printf -- ' -e "s|\&%s;|%q|g"' "${a[@]}")