- #f5# Backup \kbd{file {\rm to} file\_timestamp}
- bk() { cp -b ${1} ${1}_`date --iso-8601=m` }
- #f5# Copied diff
- cdiff() { diff -crd "$*" | egrep -v "^Only in |^Binary files " }
- #f5# cd to directoy and list files
- cl() { cd $1 && ls -a } # cd && ls
- #f5# Cvs add
- cvsa() { cvs add $* && cvs com -m 'initial checkin' $* }
- #f5# Cvs diff
- cvsd() { cvs diff -N $* |& $PAGER }
- #f5# Cvs log
- cvsl() { cvs log $* |& $PAGER }
- #f5# Cvs update
- cvsq() { cvs -nq update }
- #f5# Rcs2log
- cvsr() { rcs2log $* | $PAGER }
- #f5# Cvs status
- cvss() { cvs status -v $* }
- #f5# Disassemble source files using gcc and as
- disassemble(){ gcc -pipe -S -o - -O -g $* | as -aldh -o /dev/null }
- #f5# Firefox remote control - open given URL
- fir() { firefox -a firefox -remote "openURL($1)" }
- #f5# Create Directoy and \kbd{cd} to it
- mcd() { mkdir -p "$@"; cd "$@" } # mkdir && cd
- #f5# Unified diff to timestamped outputfile
- mdiff() { diff -udrP "$1" "$2" > diff.`date "+%Y-%m-%d"`."$1" }
- #f5# Memory overview
- memusage(){ ps aux | awk '{if (NR > 1) print $5; if (NR > 2) print "+"} END { print "p" }' | dc }
- #f5# Show contents of tar file
- shtar() { gunzip -c $1 | tar -tf - -- | $PAGER }
- #f5# Show contents of tgz file
- shtgz() { tar -ztf $1 | $PAGER }
- #f5# Show contents of zip file
- shzip() { unzip -l $1 | $PAGER }
- #f5# Greps signature from file
- sig() { agrep -d '^-- $' "$*" ~/.Signature }
- #f5# Unified diff
- udiff() { diff -urd $* | egrep -v "^Only in |^Binary files " }
- #f5# (Mis)use \kbd{vim} as \kbd{less}
- viless() { vim --cmd 'let no_plugin_maps = 1' -c "so \$VIMRUNTIME/macros/less.vim" "${@:--}" }
-
- # download video from youtube
- ytdl() {
- if ! [ -n "$2" ] ; then
- print "Usage: ydtl http://youtube.com/watch?v=.... outputfile.flv">&2
- return 1
+#f5# Backup \kbd{file {\rm to} file\_timestamp}
+bk() { cp -b ${1} ${1}_`date --iso-8601=m` }
+#f5# Copied diff
+cdiff() { diff -crd "$*" | egrep -v "^Only in |^Binary files " }
+#f5# cd to directoy and list files
+cl() { cd $1 && ls -a } # cd && ls
+#f5# Cvs add
+cvsa() { cvs add $* && cvs com -m 'initial checkin' $* }
+#f5# Cvs diff
+cvsd() { cvs diff -N $* |& $PAGER }
+#f5# Cvs log
+cvsl() { cvs log $* |& $PAGER }
+#f5# Cvs update
+cvsq() { cvs -nq update }
+#f5# Rcs2log
+cvsr() { rcs2log $* | $PAGER }
+#f5# Cvs status
+cvss() { cvs status -v $* }
+#f5# Disassemble source files using gcc and as
+disassemble(){ gcc -pipe -S -o - -O -g $* | as -aldh -o /dev/null }
+#f5# Firefox remote control - open given URL
+fir() { firefox -a firefox -remote "openURL($1)" }
+#f5# Create Directoy and \kbd{cd} to it
+mcd() { mkdir -p "$@"; cd "$@" } # mkdir && cd
+#f5# Unified diff to timestamped outputfile
+mdiff() { diff -udrP "$1" "$2" > diff.`date "+%Y-%m-%d"`."$1" }
+#f5# Memory overview
+memusage(){ ps aux | awk '{if (NR > 1) print $5; if (NR > 2) print "+"} END { print "p" }' | dc }
+#f5# Show contents of tar file
+shtar() { gunzip -c $1 | tar -tf - -- | $PAGER }
+#f5# Show contents of tgz file
+shtgz() { tar -ztf $1 | $PAGER }
+#f5# Show contents of zip file
+shzip() { unzip -l $1 | $PAGER }
+#f5# Greps signature from file
+sig() { agrep -d '^-- $' "$*" ~/.Signature }
+#f5# Unified diff
+udiff() { diff -urd $* | egrep -v "^Only in |^Binary files " }
+#f5# (Mis)use \kbd{vim} as \kbd{less}
+viless() { vim --cmd 'let no_plugin_maps = 1' -c "so \$VIMRUNTIME/macros/less.vim" "${@:--}" }
+
+# download video from youtube
+ytdl() {
+ if ! [[ -n "$2" ]] ; then
+ print "Usage: ydtl http://youtube.com/watch?v=.... outputfile.flv">&2
+ return 1