summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-12-14 11:01:09 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2016-12-14 11:01:09 -0800
commitdc1f3aae60d08ea4a3856299f85b2ed7c110508b (patch)
tree1a16772ffee6acdb2d8b77258427be7ec53c7013 /Src/builtin.c
parent5f2661376d686401a42aa15e5e3cbb6ec86a8f6c (diff)
downloadzsh-dc1f3aae60d08ea4a3856299f85b2ed7c110508b.tar.gz
zsh-dc1f3aae60d08ea4a3856299f85b2ed7c110508b.tar.xz
zsh-dc1f3aae60d08ea4a3856299f85b2ed7c110508b.zip
40179: fix handling of "printf -" and "printf --"
unposted: regression test for 40179 / 37467
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 65e0cb10b..0f04d149f 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -100,7 +100,7 @@ static struct builtin builtins[] =
 
     BUILTIN("popd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 1, BIN_POPD, "q", NULL),
     BUILTIN("print", BINF_PRINTOPTS, bin_print, 0, -1, BIN_PRINT, "abcC:Df:ilmnNoOpPrRsSu:v:x:X:z-", NULL),
-    BUILTIN("printf", 0, bin_print, 1, -1, BIN_PRINTF, "v:", NULL),
+    BUILTIN("printf", BINF_SKIPINVALID | BINF_SKIPDASH, bin_print, 1, -1, BIN_PRINTF, "v:", NULL),
     BUILTIN("pushd", BINF_SKIPINVALID | BINF_SKIPDASH | BINF_DASHDASHVALID, bin_cd, 0, 2, BIN_PUSHD, "qsPL", NULL),
     BUILTIN("pushln", 0, bin_print, 0, -1, BIN_PRINT, NULL, "-nz"),
     BUILTIN("pwd", 0, bin_pwd, 0, 0, 0, "rLP", NULL),