Skip to content

Instantly share code, notes, and snippets.

@qnighy
Created August 31, 2009 04:29
Show Gist options
  • Save qnighy/178278 to your computer and use it in GitHub Desktop.
Save qnighy/178278 to your computer and use it in GitHub Desktop.
#hypersl for zsh
#usage:
#. hypersl.sh
function sl {
PROMPT='$'
PROMPT2=''
PROMPT3=''
PROMPT4=''
RPROMPT=''
sl="/usr/games/sl"
ls="/bin/ls"
myaliases=`alias|sed -e 's/=.*//g'`
for apath in `echo $PATH|sed -e 's/:/ /g'`
do
if [ -d $apath ]
then
for cmd in `$ls $apath` ls
do
alias $cmd=$sl
if [ $apath/$cmd != $ls ]
then
alias $apath/$cmd=$sl
fi
done
fi
done
for myalias in myaliases
do
alias $myalias=$sl
done
for bcmd in . : autoload bg bindkey break builtin bye cap cd chdir clone \
command comparguments compcall compctl compdescribe compfiles \
compgroups compquote comptry compvalues continue declare dirs \
disable disown echo echotc echoti emulate enable eval exec exit \
export false fc fg float functions getcap getln getopts hash history \
integer jobs kill let limit local log logout noglob popd print \
printf pushd pushln pwd r read readonly rehash return sched set \
setcap setopt shift source stat suspend test times trap true ttyctl \
type typeset ulimit umask unalias unfunction unhash unlimit unset \
unsetopt vared wait whence where which zcompile zformat zftp zle \
zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp \
$ls alias
do
alias $bcmd=$sl
done
$sl
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment