about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2019-07-08 17:56:57 -0700
committerBart Schaefer <schaefer@zsh.org>2019-07-08 17:56:57 -0700
commit5415e1d4df68a759d5b5c3ca65c5e7b3c7c8cfb1 (patch)
treefe62051a6bb486f1bf790f742ae4307e5e9187ac /Src
parentadef791c82c1cf61206b14728ccaaa3c72abf54c (diff)
downloadzsh-5415e1d4df68a759d5b5c3ca65c5e7b3c7c8cfb1.tar.gz
zsh-5415e1d4df68a759d5b5c3ca65c5e7b3c7c8cfb1.tar.xz
zsh-5415e1d4df68a759d5b5c3ca65c5e7b3c7c8cfb1.zip
44502: Quote function name for "autoload -X"
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
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);