Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Proof of concept mainstream plugin manager
On 27 January 2016 at 05:34, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jan 26, 10:50pm, Daniel Shahaf wrote:
> } Subject: Re: Proof of concept mainstream plugin manager
> }
> } Bart Schaefer wrote on Sat, Jan 23, 2016 at 12:00:55 -0800:
> } > eval "function $func {
> } > _reload_and_run ${(q)PLUGIN_DIR} ${(qq)opts} $func "'"$@"
> } > }'
> }
> } Perhaps change $func to ${(q)func}.
>
> Sebastian has already changed that whole thing to be
>
> functions[$func]="_reload_and_run ${(q)PLUGIN_DIR} $opts $func "'"$@"
I commited your eval way to recognize it in battle (Polish idiom,
wonder if it works in English). Without quoting in ${(qq)opts}, what
you recommended earlier, I get list of all defined functions and their
bodies when shell starts (code visible in 27 sec). I tried this before
but didn't want to bother you because it's hard to express what's
happening, thus the video:
https://asciinema.org/a/eellh7umed2z45685tlhqgdqp
However, suddenly the glitch between ncd and zsh-cdr is gone. Don't
know what's happening, it was there yesterday. I guess it will be
back.
> which yes, is going to do strange things if $func contains spaces.
>
> On the other hand, the whole plugin would already be broken if $func
> contains spaces. I'd rather not "fix" it in an unpredictable way.
What do you mean? Shouldn't I do quoting, i.e. ${(q)func} ?
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author