Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parse error on autoload -X and a function with & in name
On Mon, Jul 8, 2019 at 1:03 PM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:>
> Sadly the same applies to a [] prefix
>
> On Mon, 8 Jul 2019 at 21:35, Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> wrote:
> >
> > I wanted to use the symbol as a namespacer for internal functions.
Try this (apologies if gmail line wraps the @@ heading):
diff --git a/Src/builtin.c b/Src/builtin.c
index 9b9e76c77..7db36c41b 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -3029,7 +3029,7 @@ eval_autoload(Shfunc shf, char *name, Options
ops, int func)
}
if (OPT_MINUS(ops,'X')) {
char *fargv[3];
- fargv[0] = name;
+ fargv[0] = quotestring(name, QT_SINGLE_OPTIONAL);
fargv[1] = "\"$@\"";
fargv[2] = 0;
shf->funcdef = mkautofn(shf);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author