From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: print -v with an array
Date: Fri, 4 Nov 2016 21:03:37 -0700 [thread overview]
Message-ID: <161104210337.ZM18190@torch.brasslantern.com> (raw)
In-Reply-To: <43147.1478277455@hydra.kiddle.eu>
On Nov 4, 5:37pm, Oliver Kiddle wrote:
} Subject: Re: PATCH: print -v with an array
}
} On 21 Sep, Bart wrote:
} > Yes, I'm wondering if print -S -f ... should just be an error.
}
} Combining print -S with multiple arguments with a zsh debug build is printing:
} exec.c:3837: BUG: q = 3 != queue_in = 4
Thanks for spotting that. Patch below.
Doesn't answer the question of whether -S -f should be an error. At the
moment -S and -C and -c are all ignored if -f is with them. There is
code commented out to make an error of this.
} The most notable thing about this patch is what it does not do. I've
} not moved the array behaviour to a -A option. That's not something
} I'm especially bothered about and if someone is keen to change it
} then I don't especially care.
It has occurred to me that zsh doesn't really need print -v, except
for compatibility. Other bourne-ish shells fork the right side of
pipes, so piping to read -A won't capture anything in the parent,
but zsh forks to the left. I suppose print -v does avoid that fork.
diff --git a/Src/builtin.c b/Src/builtin.c
index b7b7bdf..6c9d058 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4552,6 +4552,7 @@ bin_print(char *name, char **args, Options ops, int func)
short *words;
if (nwords > 1) {
zwarnnam(name, "option -S takes a single argument");
+ unqueue_signals();
return 1;
}
words = NULL;
prev parent reply other threads:[~2016-11-05 6:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 16:50 Oliver Kiddle
2016-09-19 20:30 ` Bart Schaefer
2016-09-21 19:51 ` Oliver Kiddle
2016-09-21 21:24 ` Bart Schaefer
2016-11-04 16:37 ` Oliver Kiddle
2016-11-05 4:03 ` Bart Schaefer [this message]
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=161104210337.ZM18190@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).