Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: adjust quoting in (...) action for bpf filters



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 \()' \# \
   \(\
     \(\
       \(\




Messages sorted by: Reverse Date, Date, Thread, Author