]> git.wh0rd.org - home.git/blobdiff - .profile.d/aliases.sh
goobuntu: install more dev pkgs
[home.git] / .profile.d / aliases.sh
index 6fe1663f88d66f85176d4fcb812c0018753e8832..08080b16a30d7ea37aa2e4253272377b5dc08b74 100644 (file)
@@ -1,31 +1,54 @@
-[[ $- != *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.2 -vmargs -Xmx512m'
+alias g='git'
 alias gdb='gdb --quiet'
 alias gdbtui='gdbtui --quiet'
-alias grep='grep --colour=auto'
-alias ls='ls --color=auto'
+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'
 alias lynx='lynx -nopause -accept_all_cookies -use_mouse'
 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'
 
-grep-svn() { find '(' -wholename '*/.svn' -prune -o -type f -print0 ')' | xargs -0 grep "$@" ; }
+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'
+
+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' \
@@ -33,15 +56,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.*::' \
+               "$@"
 }
 
 scrub_html() {
-       sed -i \
-               -e 's:&lt;:<:g' -e 's:&gt;:>:g' \
-               -e 's:&nbsp;::g' -e 's:&amp;:\&:g' \
-               -e 's:&quot;:":g' \
-               "$@"
+       local a=(
+               'lt'    '<'
+               'gt'    '>'
+               'nbsp'  ' '
+               'amp'   '&'
+               'quot'  '"'
+       )
+       [[ $# -gt 0 ]] && set -- "$@" -i
+       eval sed \"\$@\" $(printf -- ' -e "s|\&%s;|%q|g"' "${a[@]}")
 }