]> git.wh0rd.org - home.git/blobdiff - .profile.d/aliases.sh
add adk_path helper
[home.git] / .profile.d / aliases.sh
index 479b8f765798979cce210a1116345eddd3e4db9c..ddb898c81d17ffb10ee9d585a93786364a4eb3b5 100644 (file)
@@ -1,24 +1,64 @@
-[[ $- != *i* ]] && return
-
+alias axine='xine -A null'
+alias b='bzr'
 alias bc='bc -q'
+#alias bittorrent-curses='bittorrent-curses --max_upload_rate 10'
+#alias bt='bittorrent-curses --max_upload_rate 10 --save_in . --save_incomplete_in .'
+alias cdrecord='cdrecord -vvv -eject driveropts=burnfree'
 alias duh='du . --max-depth=1 -h'
-alias eclipse='eclipse-3.1 -vmargs -Xmx512m'
+alias eclipse='eclipse-3.2 -vmargs -Xmx512m'
+alias g='git'
 alias gdb='gdb --quiet'
-alias grep='grep --colour=auto'
-alias ls='ls --color=auto'
-alias lynx='lynx -nopause -accept_all_cookies -use_mouse'
+alias gdbtui='gdbtui --quiet'
+alias nohist='export HISTFILE=/dev/null'
+alias kpdf='okular'
+alias ipython='ipython --no-banner --no-confirm-exit --pdb --nosep --PromptManager.in_template=">>> " --PromptManager.out_template="" --PromptManager.justify=False'
+if command -v elinks >/dev/null ; then
+       alias links='elinks'
+       alias lynx='elinks'
+elif command -v lynx >/dev/null ; then
+       alias lynx='lynx -nopause -accept_all_cookies -use_mouse'
+fi
 alias minicom='minicom -w -c on'
 alias nslookup='nslookup -sil'
+alias p1='patch -p1'
+alias p1d='patch -p1 --dry-run'
+alias p1dr='patch -p1 --dry-run -R'
+alias p1r='patch -p1 -R'
+alias quake4='quake4 +set s_driver oss'
+alias repoman='repoman -q -q'
+alias rrsync='rsync -Hav --inplace --progress'
 alias s='aspell -a'
-ss() { aspell -a <<<"$*"; }
+sss() { aspell -a <<<"$*"; }
+svlc() { sudo -u smriti sh -c 'export DISPLAY=:0; xset s reset; exec vlc "$@" >/dev/null 2>&1' sh "$@" ; }
+svnc() { sudo -u smriti sh -c 'export DISPLAY=:0; xset s reset; exec x11vnc -q -nopw' ; }
+alias xine='xine -l'
+
+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'
 
-grep-svn() { find '(' -wholename '*/.svn' -prune -o -type f -print0 ')' | xargs -0 grep "$@" ; }
+adk_path() {
+       local adk=/usr/local/src/android/adk/current/sdk
+       PATH+=":${adk}/tools:${adk}/platform-tools"
+}
+
+pd() {
+       if [[ $# -eq 0 ]] ; then
+               popd
+       else
+               pushd "$@"
+       fi
+}
+
+if [[ ${TERM} != "dumb" ]] ; then
+       export GREP_COLORS=ne #470810
+       alias grep='grep --colour=auto -d skip'
+       alias ls='ls --color=auto'
+fi
 
 scrub_patch() {
-    sed -i \
-        -e '/^index /d' \
+       sed -i \
+               -e '/^index /d' \
                -e '/^new file mode /d' \
-        -e '/^Index:/d' \
+               -e '/^Index:/d' \
                -e '/^=========/d' \
                -e '/^RCS file:/d' \
                -e '/^retrieving/d' \
@@ -26,68 +66,20 @@ scrub_patch() {
                -e '/^Files .* differ$/d' \
                -e '/^Only in /d' \
                -e '/^Common subdirectories/d' \
-        -e '/^+++/s:\t.*::' \
-        -e '/^---/s:\t.*::' \
-        "$@"
+               -e '/^deleted file mode [0-9]*$/d' \
+               -e '/^+++/s:\t.*::' \
+               -e '/^---/s:\t.*::' \
+               "$@"
 }
 
-cvs_gentoo_url() {
-_cvs_gentoo_url() {
-       if [[ -n $2 ]] ; then
-               echo "Usage: cvs_gentoo_url <file>[:rev1[:rev2]]"
-               return 1
-       fi
-
-       # spec has the form file:rev1[:rev2]
-       # rev2 defaults to rev1-1
-       export IFS=:
-       set -- $1
-       unset IFS
-
-       local file=$1
-       if [[ ! -e ${file} ]] ; then
-               echo "file '${file}' does not exist"
-               return 1
-       fi
-       local dir="."
-       [[ ${file} == */* ]] && dir=${file%/*}
-       file=${file##*/}
-
-       local rev2=$2
-       if [[ -z ${rev2} ]] ; then
-               rev2=$(
-                       cd ${dir}
-                       export IFS=/
-                       set -- $(grep /${file}/ CVS/Entries)
-                       unset IFS
-                       echo $3
-               )
-               if [[ ${rev2} == "0" ]] ; then
-                       # new file
-                       rev2="1.1"
-               else
-                       # existing file, bump rev automatically
-                       rev2="1.$((${rev2#1.}+1))"
-               fi
-       fi
-       local rev2r=${rev2#1.}
-       local rev1=${3:-1.$((rev2r - 1))}
-
-       local cvsroot=$(<${dir}/CVS/Repository)
-       if [[ ${cvsroot} == gentoo-x86* ]] ; then
-               cvsroot=${cvsroot#gentoo-x86}
-               cvsroot=${cvsroot#/}
-       fi
-
-       local urirev
-       [[ ${rev2} == "1.1" || ${rev1} == "${rev2}" ]] \
-               && urirev="?rev=${rev2}" \
-               || urirev="?r1=${rev1}&r2=${rev2}"
-       echo "http://sources.gentoo.org/${cvsroot}/${file}${urirev}"
-}
-       local f
-       for f in "$@" ; do
-               _cvs_gentoo_url "${f}"
-       done
-       unset _cvs_gentoo_url
+scrub_html() {
+       local a=(
+               'lt'    '<'
+               'gt'    '>'
+               'nbsp'  ' '
+               'amp'   '&'
+               'quot'  '"'
+       )
+       [[ $# -gt 0 ]] && set -- "$@" -i
+       eval sed \"\$@\" $(printf -- ' -e "s|\&%s;|%q|g"' "${a[@]}")
 }