diff options
| author | Jean-Noël Avila <jn.avila@free.fr> | 2025-03-19 08:16:22 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-20 19:27:29 -0700 |
| commit | e1b81f54da80267edee2cb8fd0d0f75f03023019 (patch) | |
| tree | cebd6bfbf50bbd82fc65bdd41d0abe148d70e3db | |
| parent | Git 2.49 (diff) | |
| download | git-e1b81f54da80267edee2cb8fd0d0f75f03023019.tar.gz git-e1b81f54da80267edee2cb8fd0d0f75f03023019.zip | |
completion: take into account the formatting backticks for options
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.
The script `generate-configlist.sh` is updated to get rid of extraneous
commands and fit everything in a single sed script.
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
| -rwxr-xr-x | generate-configlist.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/generate-configlist.sh b/generate-configlist.sh index dffdaada8b..b06da53c89 100755 --- a/generate-configlist.sh +++ b/generate-configlist.sh @@ -13,10 +13,18 @@ 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' | - sort | - sed 's/^.*$/ "&",/' + sed -E ' +/^`?[a-zA-Z].*\..*`?::$/ { + /deprecated/d; + s/::$//; + s/`//g; + s/^.*$/ "&",/; + s/, */",\n "/g; + p;}; +d' \ + "$SOURCE_DIR"/Documentation/*config.adoc \ + "$SOURCE_DIR"/Documentation/config/*.adoc| + sort cat <<EOF NULL, }; |
