zsh-workers
 help / color / mirror / Atom feed
* PATCH: adjust quoting in (...) action for bpf filters
@ 2021-04-06 12:11 Oliver Kiddle
  2021-04-06 15:18 ` Daniel Shahaf
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Kiddle @ 2021-04-06 12:11 UTC (permalink / raw)
  To: Zsh workers

In 43928, _alternative was brought into line with _arguments in terms of
parsing of (...) actions. That being consistent is sensible but did
change what quoting was necessary. So completion after tcpdump po<tab>
is printing an "(eval):1: parse error" message. I've tried searching for
other potentially affected cases and not found any but it isn't easy to
construct a good regular expression. Note that _regex_arguments uses
_alternative for all the gathered results.

Oliver

diff --git a/Completion/Unix/Type/_bpf_filters b/Completion/Unix/Type/_bpf_filters
index 54e2172c9..b744b1ab4 100644
--- a/Completion/Unix/Type/_bpf_filters
+++ b/Completion/Unix/Type/_bpf_filters
@@ -63,7 +63,7 @@ compquote suf
 # protocol or field: it is one, the other or both but not neither
 
 _regex_arguments _bpf /$'[^\0]#\0'/ \( \
-  /$'(not[ \0]#|![ \0]#|(\\\\|)\\([ \0]#)'/ ':operators:operator:(not ()' \# \
+  /$'(not[ \0]#|![ \0]#|(\\\\|)\\([ \0]#)'/ ':operators:operator:(not \()' \# \
   \(\
     \(\
       \(\


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: adjust quoting in (...) action for bpf filters
  2021-04-06 12:11 PATCH: adjust quoting in (...) action for bpf filters Oliver Kiddle
@ 2021-04-06 15:18 ` Daniel Shahaf
  2021-04-10 21:18   ` dana
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Shahaf @ 2021-04-06 15:18 UTC (permalink / raw)
  To: zsh-workers

Oliver Kiddle wrote on Tue, 06 Apr 2021 12:11 +00:00:
> In 43928, [...] did change what quoting was necessary. So completion
> after tcpdump po<tab> is printing an "(eval):1: parse error" message.
> I've tried searching for other potentially affected cases and not
> found any but it isn't easy to construct a good regular expression.

Sounds like we should update NEWS/README, then.  dana, WDYT?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: adjust quoting in (...) action for bpf filters
  2021-04-06 15:18 ` Daniel Shahaf
@ 2021-04-10 21:18   ` dana
  2021-04-13 11:43     ` Daniel Shahaf
  0 siblings, 1 reply; 5+ messages in thread
From: dana @ 2021-04-10 21:18 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh hackers list

On 6 Apr 2021, at 10:18, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Sounds like we should update NEWS/README, then.  dana, WDYT?

I added a note to README. I don't think NEWS needs updating since my change
only made the function behave as documented

dana



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: adjust quoting in (...) action for bpf filters
  2021-04-10 21:18   ` dana
@ 2021-04-13 11:43     ` Daniel Shahaf
  2021-04-13 21:57       ` dana
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Shahaf @ 2021-04-13 11:43 UTC (permalink / raw)
  To: dana; +Cc: Zsh hackers list

dana wrote on Sat, Apr 10, 2021 at 16:18:32 -0500:
> On 6 Apr 2021, at 10:18, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> > Sounds like we should update NEWS/README, then.  dana, WDYT?
> 
> I added a note to README. I don't think NEWS needs updating since my change
> only made the function behave as documented

Thanks, fair enough.

Suggesting a further tweak, as follows.  Feel free to commit it directly.

Since the text is added to the 5.6.2→5.7.1 section of README, anyone who
has already upgraded to ≥5.7.1 might miss this.  I'm not sure what to do
about this.

Cheers,

Daniel


diff --git a/README b/README
index 5e3b8cc59..4ff7137ea 100644
--- a/README
+++ b/README
@@ -150,7 +150,9 @@ and in the double-parentheses and 'let' arithmetic commands.
 
 3) _alternative now correctly handles the same (...) action syntax as
 _arguments; this may necessitate quoting/escaping in calls to _alternative
-and _regex_arguments that wasn't previously required.
+and _regex_arguments that wasn't previously required.  See
+https://zsh.org/workers/48414 (commit zsh-5.8-348-g2c000ee7b) for details
+and an example.
 
 Incompatibilities between 5.5.1 and 5.6.2
 ------------------------------------------


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: adjust quoting in (...) action for bpf filters
  2021-04-13 11:43     ` Daniel Shahaf
@ 2021-04-13 21:57       ` dana
  0 siblings, 0 replies; 5+ messages in thread
From: dana @ 2021-04-13 21:57 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh hackers list

On 13 Apr 2021, at 06:43, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Suggesting a further tweak, as follows.  Feel free to commit it directly.

Done

On 13 Apr 2021, at 06:43, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Since the text is added to the 5.6.2→5.7.1 section of README, anyone who
> has already upgraded to ≥5.7.1 might miss this.  I'm not sure what to do
> about this.

Yeah, i considered that, but i couldn't think of a way to make it more
apparent whilst maintaining the format/purpose of the file. I guess we could
add a note to NEWS saying that README was updated, but feels excessive tbh

dana



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-13 21:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 12:11 PATCH: adjust quoting in (...) action for bpf filters Oliver Kiddle
2021-04-06 15:18 ` Daniel Shahaf
2021-04-10 21:18   ` dana
2021-04-13 11:43     ` Daniel Shahaf
2021-04-13 21:57       ` dana

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git