netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ipset] bash-completion: fix syntax error
@ 2023-07-21 22:13 Jeremy Sowden
  2023-08-22  9:12 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Sowden @ 2023-07-21 22:13 UTC (permalink / raw)
  To: Netfilter Devel

There is a syntax error in a redirection:

  $ bash -x utils/ipset_bash_completion/ipset
  + shopt -s extglob
  utils/ipset_bash_completion/ipset: line 365: syntax error near unexpected token `('
  utils/ipset_bash_completion/ipset: line 365: `done < <(PATH=${PATH}:/sbin ( command ip -o link show ) )'

Move the environment variable assignment into the sub-shell.

Fixes: da6242e17583 ("Updated utilities")
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041605
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 utils/ipset_bash_completion/ipset | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/ipset_bash_completion/ipset b/utils/ipset_bash_completion/ipset
index d258be234806..fc95d4043865 100644
--- a/utils/ipset_bash_completion/ipset
+++ b/utils/ipset_bash_completion/ipset
@@ -362,7 +362,7 @@ _ipset_get_ifnames() {
 while read -r; do
     REPLY="${REPLY#*: }"
     printf "%s\n" ${REPLY%%:*}
-done < <(PATH=${PATH}:/sbin ( command ip -o link show ) 2>/dev/null)
+done < <(( PATH=${PATH}:/sbin command ip -o link show ) 2>/dev/null)
 }
 
 _ipset_get_iplist() {
-- 
2.40.1


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

* Re: [PATCH ipset] bash-completion: fix syntax error
  2023-07-21 22:13 [PATCH ipset] bash-completion: fix syntax error Jeremy Sowden
@ 2023-08-22  9:12 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2023-08-22  9:12 UTC (permalink / raw)
  To: Jeremy Sowden; +Cc: Netfilter Devel, kadlec

On Fri, Jul 21, 2023 at 11:13:11PM +0100, Jeremy Sowden wrote:
> There is a syntax error in a redirection:
> 
>   $ bash -x utils/ipset_bash_completion/ipset
>   + shopt -s extglob
>   utils/ipset_bash_completion/ipset: line 365: syntax error near unexpected token `('
>   utils/ipset_bash_completion/ipset: line 365: `done < <(PATH=${PATH}:/sbin ( command ip -o link show ) )'
> 
> Move the environment variable assignment into the sub-shell.

Applied, thanks

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

end of thread, other threads:[~2023-08-22  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 22:13 [PATCH ipset] bash-completion: fix syntax error Jeremy Sowden
2023-08-22  9:12 ` Pablo Neira Ayuso

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