zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: PATCH Re: 5.3: printf -
Date: Tue, 13 Dec 2016 20:48:15 -0800	[thread overview]
Message-ID: <161213204815.ZM24665@torch.brasslantern.com> (raw)
In-Reply-To: <161212202110.ZM19667@torch.brasslantern.com>

Apparently this was introduced in 37467 when I changed "printf" from
having no options at all to having the -v option for print-to-variable.

There's some documentation saying that ideally we would not create any
new builtins with BINF_SKIPINVALID but I don't see any other way to get
back the old behavior.

diff --git a/Src/builtin.c b/Src/builtin.c
index 65e0cb1..0f04d14 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),


  parent reply	other threads:[~2016-12-14  4:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 23:41 Daniel Shahaf
2016-12-13  4:21 ` Bart Schaefer
2016-12-13  6:25   ` Daniel Shahaf
2016-12-14  4:48   ` Bart Schaefer [this message]
2016-12-14  9:39     ` PATCH " Peter Stephenson
2016-12-14 16:51       ` Daniel Shahaf
2016-12-14 18:44         ` Bart Schaefer
2016-12-15  0:50           ` Daniel Shahaf
2016-12-15  1:14             ` Chet Ramey
2016-12-15 22:45               ` Daniel Shahaf
2016-12-15 23:48                 ` Chet Ramey
2016-12-16  0:56                   ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161213204815.ZM24665@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).