FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: guaneryu@gmail.com
Cc: fstests@vger.kernel.org, Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH] common/config: Allow sections names to contain hyphen
Date: Thu, 25 Jun 2020 15:37:44 +0300
Message-ID: <20200625123744.17812-1-nborisov@suse.com> (raw)

Current regular expression in get_config_sections allows section names
to consist of alphanumeric character and underscore. Extend it to
also allow the hyphen '-' character.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
 common/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/config b/common/config
index 8023273da115..63d486125a76 100644
--- a/common/config
+++ b/common/config
@@ -449,7 +449,7 @@ known_hosts()
 # in the section name otherwise the section will not be resognised.
 # Section name must be contained between square brackets.
 get_config_sections() {
-	sed -n -e "s/^\[\([[:alnum:]_]*\)\]/\1/p" < $1
+	sed -n -e "s/^\[\([[:alnum:]_-]*\)\]/\1/p" < $1
 if [ ! -f "$HOST_OPTIONS" ]; then

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200625123744.17812-1-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:

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