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

Re: Surprising effect of fun() { local FPATH=...; autoload -X }, and a bug



Sebastian Gniazdowski wrote on Tue, Sep 27, 2016 at 00:07:37 +0200:
>             eval "function $func {
>                 local FPATH="$PLUGIN_DIR":"${FPATH}"
>                 builtin autoload -X ${opts[*]}
>             }"

The " signs in the first line of the function body need to be escaped.

The parameter expansions $foo need to be escaped, some as \$foo and
others as ${(q)foo}.

(No idea about your question; if I had an idea I'd have shared it.)

Cheers,

Daniel



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