Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PWS :reload



On Thu, 12 May 2005 17:05:51 +0000,  Bart wrote:

>
>We're venturing into the realm of "you should be able to do this yourself."
Richtig aber,  as reload is I believe of general interest I though this way we'd get the best
version!

function reload() {
# reload your changed autoloaded function(s)
if (( $# == 0 ));
then
    print "Reload what?" >&2
    return 1
fi
while (( $# )); do
    unfunction $1 2>/dev/null || print -u2 "$1 loading for the first time"
    autoload $1
    shift
done
}
-- 
zzapper
vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"
http://www.rayninfo.co.uk/tips/ vim, zsh & success tips



Messages sorted by: Reverse Date, Date, Thread, Author