All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neutron Soutmun <neo.neutron@gmail.com>
To: kadlec@blackhole.kfki.hu
Cc: netfilter-devel@vger.kernel.org, neo.neutron@gmail.com
Subject: [PATCH] ipset: Fix syntax error of bash completion in Debian environment
Date: Sun, 12 May 2013 16:28:29 +0700	[thread overview]
Message-ID: <20130512092829.GA9286@nitrogen.neutroncom.local> (raw)

Debian packaging tool (lintian) warns the syntax error of bash completion
as it uses the extglob shell option that should be run in
the ** #!/usr/bin/env bash ** and the shell option set should be moved to
global scope.

Signed-off-by: Neutron Soutmun <neo.neutron@gmail.com>
---
 utils/ipset_bash_completion/ipset_bash_completion |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/ipset_bash_completion/ipset_bash_completion b/utils/ipset_bash_completion/ipset_bash_completion
index cc7ea7b..8a0b91d 100644
--- a/utils/ipset_bash_completion/ipset_bash_completion
+++ b/utils/ipset_bash_completion/ipset_bash_completion
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # -----------------------------------------------------------------
 # Programmable completion code for ipset (netfilter.org)
@@ -47,6 +47,8 @@
 #
 # -----------------------------------------------------------------
 
+shopt -s extglob
+
 # -----------------------------------------------------------------
 # Functions
 # -----------------------------------------------------------------
@@ -537,7 +539,6 @@ done < "${_IPSET_IPLIST_FILE}"
 # -----------------------------------------------------------------
 
 _ipset_complete() {
-shopt -s extglob
 local cur prev cword words ips_version
 local str_action str_setname str_type str_filename
 local str_glob str_regex str_prefix str_suffix
-- 
1.7.10.4


             reply	other threads:[~2013-05-12  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-12  9:28 Neutron Soutmun [this message]
2013-05-12 12:07 ` [PATCH] ipset: Fix syntax error of bash completion in Debian environment Neutron Soutmun
2013-05-15 19:24   ` Bourne Without
2013-05-16  9:46     ` Neutron Soutmun

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=20130512092829.GA9286@nitrogen.neutroncom.local \
    --to=neo.neutron@gmail.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.