Thread (6 messages) read the whole thread 6 messages, 1 author, 2025-03-19
STALE498d

[PATCH 1/2] completion: take into account the formatting backticks for options

From: Jean-Noël Avila via GitGitGadget <hidden>
Date: 2025-03-15 16:31:53
Subsystem: the rest · Maintainer: Linus Torvalds

From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <redacted>

With the modern formatting of the manpages, the options and commands are now
backticked in their definition lists. This patch updates the generation of
the completion list to take into account this new format.

Signed-off-by: Jean-Noël Avila <redacted>
---
 generate-configlist.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/generate-configlist.sh b/generate-configlist.sh
index dffdaada8b5..802178daad4 100755
--- a/generate-configlist.sh
+++ b/generate-configlist.sh
@@ -13,8 +13,8 @@ print_config_list () {
 	cat <<EOF
 static const char *config_name_list[] = {
 EOF
-	grep -h '^[a-zA-Z].*\..*::$' "$SOURCE_DIR"/Documentation/*config.adoc "$SOURCE_DIR"/Documentation/config/*.adoc |
-	sed '/deprecated/d; s/::$//; s/,  */\n/g' |
+	grep -h '^`\?[a-zA-Z].*\..*`\?::$' "$SOURCE_DIR"/Documentation/*config.adoc "$SOURCE_DIR"/Documentation/config/*.adoc |
+	sed '/deprecated/d; s/::$//; s/`//g; s/,  */\n/g' |
 	sort |
 	sed 's/^.*$/	"&",/'
 	cat <<EOF
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help