From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: add-zle-hook-widget and multiple hooks
Date: Sat, 27 Jun 2020 02:54:08 +0000 [thread overview]
Message-ID: <20200627025408.2727d3c1@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20200618114219.7973f8c7@tarpaulin.shahaf.local2>
Daniel Shahaf wrote on Thu, 18 Jun 2020 11:42 +0000:
> Daniel Shahaf wrote on Wed, 10 Jun 2020 13:34 +0000:
> > Over here the jury's still out.
>
> In the absence of further feedback I've gone ahead completed the C patch
> using the originally posted syntax. Any comments, reservations, etc.,
> speak up.
I missed some boilerplate in the argument parsing in C; interdiff:
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 63bd45c8d..cd3f2c356 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -737,12 +737,14 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
switch (**args) {
case 'f':
flag = args[0][1] ? args[0]+1 : args[1];
- if (strcmp(flag, "nolast")) {
+ if (flag == NULL || strcmp(flag, "nolast")) {
zwarnnam(name, "%s", "'nolast' expected after -f");
if (remetafy)
metafy_line();
return 1;
}
+ if (!args[0][1])
+ *++args = skip_this_arg;
/* If you add magic strings here, be consistent with bin_zle_flags() */
setlbindk = 1;
break;
Cheers,
Daniel
next prev parent reply other threads:[~2020-06-27 2:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 8:40 Daniel Shahaf
2020-06-06 11:58 ` Mikael Magnusson
2020-06-08 6:14 ` Daniel Shahaf
2020-06-08 17:52 ` Mikael Magnusson
2020-06-10 13:34 ` Daniel Shahaf
2020-06-18 11:42 ` Daniel Shahaf
2020-06-27 2:54 ` Daniel Shahaf [this message]
2020-06-27 3:02 ` 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=20200627025408.2727d3c1@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).