zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/2] Fix Completion iptables -t raw security
@ 2018-10-08  3:24 a-wing
  2018-10-08  3:24 ` [PATCH 2/2] Fix Completion iptables 194: ;& => ;; a-wing
  2018-10-08 13:50 ` [PATCH 1/2] Fix Completion iptables -t raw security Daniel Shahaf
  0 siblings, 2 replies; 5+ messages in thread
From: a-wing @ 2018-10-08  3:24 UTC (permalink / raw)
  To: zsh-workers; +Cc: a-wing

---
 Completion/Linux/Command/_iptables | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Completion/Linux/Command/_iptables b/Completion/Linux/Command/_iptables
index 447d7c932..ae8d66ea4 100644
--- a/Completion/Linux/Command/_iptables
+++ b/Completion/Linux/Command/_iptables
@@ -7,7 +7,7 @@ case $service in
   iptables-save | ip6tables-save)
     _arguments -s \
       {-c,--counters}'[include values of packet and byte counters in output]' \
-      {-t,--table}'[specify table]:table:(filter nat mangle)'
+      {-t,--table}'[specify table]:table:(filter nat mangle raw security)'
     return
   ;;
   iptables-restore | ip6tables-restore)
@@ -89,7 +89,7 @@ esac
 local i=1
 typeset -U args
 while
-  (( i=words[(ib.i.)-m|--match]+1 )) 
+  (( i=words[(ib.i.)-m|--match]+1 ))
 (( i<CURRENT )); do
   case ${words[i]}; in
     ah) args+=( '--ahspi[match SPIs in AH header]:*^!:spi' ) ;;
@@ -158,7 +158,7 @@ done
 _arguments -C -s \
   '(-)'{-h,--help}'[print program information]' \
   '(-)'{-V,--version}'[print version information]' \
-  '(-h --help -V --version)'{-t,--table}'[specify table]:table:(filter nat mangle)' \
+  '(-h --help -V --version)'{-t,--table}'[specify table]:table:(filter nat mangle raw security)' \
   "($rcmds $cmds)"{-A,--append}'[append rules to end of specified chain]:chain:->chains' \
   "($rcmds $cmds -c --set-counters)"{-D,--delete}'[delete rules from specified chain]:chain:->chains::rule number:->rulenums' \
   "($rcmds $cmds)"{-I,--insert}'[insert rules before specified rule number]:chain:->chains::rule number:->rulenums' \
-- 
2.19.0


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

* [PATCH 2/2] Fix Completion iptables 194: ;& => ;;
  2018-10-08  3:24 [PATCH 1/2] Fix Completion iptables -t raw security a-wing
@ 2018-10-08  3:24 ` a-wing
  2018-10-08 13:52   ` Daniel Shahaf
  2018-10-08 13:50 ` [PATCH 1/2] Fix Completion iptables -t raw security Daniel Shahaf
  1 sibling, 1 reply; 5+ messages in thread
From: a-wing @ 2018-10-08  3:24 UTC (permalink / raw)
  To: zsh-workers; +Cc: a-wing

---
 Completion/Linux/Command/_iptables | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Linux/Command/_iptables b/Completion/Linux/Command/_iptables
index ae8d66ea4..2d9697418 100644
--- a/Completion/Linux/Command/_iptables
+++ b/Completion/Linux/Command/_iptables
@@ -191,7 +191,7 @@ case "$state" in
     _wanted targets expl 'builtin target' compadd \
         ACCEPT DROP QUEUE RETURN DNAT DSCP ECN LOG MARK MASQUERADE MIRROR \
 	REDIRECT REJECT SNAT TCPMSS TOS ULOG && ret=0
-  ;&
+  ;;
   user-chains)
     _wanted chains expl 'user-defined chain' compadd \
 	${${${${(M)${(f)"$(_call_program chains $words[1] \
-- 
2.19.0


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

* Re: [PATCH 1/2] Fix Completion iptables -t raw security
  2018-10-08  3:24 [PATCH 1/2] Fix Completion iptables -t raw security a-wing
  2018-10-08  3:24 ` [PATCH 2/2] Fix Completion iptables 194: ;& => ;; a-wing
@ 2018-10-08 13:50 ` Daniel Shahaf
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Shahaf @ 2018-10-08 13:50 UTC (permalink / raw)
  To: a-wing, zsh-workers

a-wing wrote on Mon, 08 Oct 2018 11:24 +0800:
> @@ -89,7 +89,7 @@ esac
> -  (( i=words[(ib.i.)-m|--match]+1 )) 
> +  (( i=words[(ib.i.)-m|--match]+1 ))

Thanks, applied.  In the future please try to avoid unrelated whitespace changes.

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

* Re: [PATCH 2/2] Fix Completion iptables 194: ;& => ;;
  2018-10-08  3:24 ` [PATCH 2/2] Fix Completion iptables 194: ;& => ;; a-wing
@ 2018-10-08 13:52   ` Daniel Shahaf
  2018-10-08 13:55     ` Daniel Shahaf
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Shahaf @ 2018-10-08 13:52 UTC (permalink / raw)
  To: a-wing, zsh-workers

a-wing wrote on Mon, 08 Oct 2018 11:24 +0800:
> ---
>  Completion/Linux/Command/_iptables | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Completion/Linux/Command/_iptables b/Completion/Linux/
> Command/_iptables
> index ae8d66ea4..2d9697418 100644
> --- a/Completion/Linux/Command/_iptables
> +++ b/Completion/Linux/Command/_iptables
> @@ -191,7 +191,7 @@ case "$state" in
>      _wanted targets expl 'builtin target' compadd \
>          ACCEPT DROP QUEUE RETURN DNAT DSCP ECN LOG MARK MASQUERADE MIRROR \
>  	REDIRECT REJECT SNAT TCPMSS TOS ULOG && ret=0
> -  ;&
> +  ;;

I'm sorry but this patch is wrong.  iptables(8) explicitly states:

[[[
TARGETS
                                                    … the value of the target,
       which can be the name of a user-defined chain, one of the targets
       described in iptables-extensions(8), or one of the special values
       ACCEPT, DROP or RETURN.
]]]

For future reference, log messages should describe the functional change and
its purpose, not the syntactic change.  That is, it should say something
_beyond_ what can be understood by parsing the unidiff.

Thanks for the patch,

Daniel

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

* Re: [PATCH 2/2] Fix Completion iptables 194: ;& => ;;
  2018-10-08 13:52   ` Daniel Shahaf
@ 2018-10-08 13:55     ` Daniel Shahaf
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Shahaf @ 2018-10-08 13:55 UTC (permalink / raw)
  To: a-wing, zsh-workers

Daniel Shahaf wrote on Mon, 08 Oct 2018 13:52 +0000:
> For future reference, log messages should describe the functional change and
> its purpose, not the syntactic change.  That is, it should say something
> _beyond_ what can be understood by parsing the unidiff.

For example, "Don't complete user-defined chains when completing targets".

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

end of thread, other threads:[~2018-10-08 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08  3:24 [PATCH 1/2] Fix Completion iptables -t raw security a-wing
2018-10-08  3:24 ` [PATCH 2/2] Fix Completion iptables 194: ;& => ;; a-wing
2018-10-08 13:52   ` Daniel Shahaf
2018-10-08 13:55     ` Daniel Shahaf
2018-10-08 13:50 ` [PATCH 1/2] Fix Completion iptables -t raw security Daniel Shahaf

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).