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

Re: autoload +X[zk]



On Mar 27, 12:49pm, Sven Wischnowsky wrote:
} Subject: autoload +X[zk]
}
} Note: intentionally no PATCH in the subject, I think I let others
} decide if we should use this patch, or change it before using it.

I think we should apply it and then fix a couple of things.

} I'm not sure about this because it also changes ksh-style autoloading
} with `autoload +X' (independent if it's done because of giving the new 
} -k flag or because KSH_AUTOLOAD is set) to execute the file loaded to
} get at the function definition. And `autoload +X' has been around for
} some time...

Here's what I'd *like* for it to do, and you tell me how hard it is ...

I'd like autoload +X on a ksh-autoloaded function `foo' to behave "as if"
the user had executed

	f=($^fpath/foo(|)(N))
	eval "function foo { ${$(< $f[1])};"' foo "$@" }'

Otherwise I think this patch is just fine.

} The good thing is that it integrates execautofn() and loadautofn().

Thank you.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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