Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### OBSOLETED BY http://druidbsd.cvs.sf.net/viewvc/druidbsd/home/bash_profile?view=markup ###
- devin@localhost ~ $ preexec(){ cmd=$( exec 2>&-; history | /usr/bin/tail -1 ); cmd="${cmd#*[0-9] }"; cmd="${cmd%%[$IFS]*}"; fcmd=; case "$cmd" in *[^[:alnum:]_]*) return; esac; case "$( exec 2>&-; type $cmd )" in *builtin*|*keyword*) case "$cmd" in echo|printf) fcmd="builtin $cmd" ;; *) return; esac;; *) fcmd=$( which $cmd ); esac; [ "$fcmd" ] || return; unset -f $cmd 2> /dev/null; if [ "$LOLCAT" ]; then unalias $cmd 2> /dev/null; eval "$cmd(){ $fcmd \"\$@\" | $LOLCAT; }"; fi; }
- devin@localhost ~ $ trap preexec DEBUG
- devin@localhost ~ $ LOLCAT=cowsay
- devin@localhost ~ $ echo hi
- ____
- < hi >
- ----
- \ ^__^
- \ (oo)\_______
- (__)\ )\/\
- ||----w |
- || ||
- devin@localhost ~ $ ls /etc/periodic/
- _______________________________
- < daily monthly security weekly >
- -------------------------------
- \ ^__^
- \ (oo)\_______
- (__)\ )\/\
- ||----w |
- || ||
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement