[PATCH v2] completion: Make sed command that generates config-list.h portable.
- From
Collin Funk <collin.funk1@gmail.com>
- Date
- Jun 2, 2025, 19:26 UTC
- Message-ID
- <1ff542bb1090cc5185644d6032addac5cd0df402.1748892261.git.collin.funk1@gmail.com>
- In-Reply-To
- <0ab924839df48d869682bea1b0cb400f378ca6dc.1748889654.git.collin.funk1@gmail.com>
The OpenBSD 'sed' command does not support '\n' to represent newlines in sed expressions. This leads to the follow compiler error:
In file included from builtin/help.c:15:
./config-list.h:282:18: error: use of undeclared identifier 'n'
"gitcvs.dbUser",n "gitcvs.dbPass",
^
1 error generated.
gmake: *** [Makefile:2821: builtin/help.o] Error 1We can use a backslash followed by a newline to fix this.
This portably issue was introduced in e1b81f54da (completion: take into account the formatting backticks for options, 2025-03-19)
Signed-off-by: Collin Funk <collin.funk1@gmail.com> --- generate-configlist.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/generate-configlist.sh b/generate-configlist.sh index b06da53c89..e1f9e99488 100755 --- a/generate-configlist.sh +++ b/generate-configlist.sh @@ -19,7 +19,8 @@ EOF s/::$//; s/`//g; s/^.*$/ "&",/; - s/, */",\n "/g; + s/, */",\ + "/g; p;}; d' \ "$SOURCE_DIR"/Documentation/*config.adoc \
-- 2.49.0