diff mbox series

[FFmpeg-devel,7/8] fftools/cmdutils: surround option arguments by <> in help output

Message ID 20240117124036.7877-7-anton@khirnov.net
State Accepted
Commit 9cb52927b9d50a7e3fb762b2ace5236e684da5df
Headers show
Series [FFmpeg-devel,1/8] fftools/cmdutils: hide some information listing options from basic help | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch
yinshiyou/configure_loongarch64 warning Failed to apply patch

Commit Message

Anton Khirnov Jan. 17, 2024, 12:40 p.m. UTC
Makes it more clear that they are placeholders for actual values.
---
 fftools/cmdutils.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index f652820184..daf7673adb 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -132,10 +132,9 @@  void show_help_options(const OptionDef *options, const char *msg, int req_flags,
         else if (po->flags & OPT_FLAG_SPEC)
             av_strlcat(buf, "[:<spec>]", sizeof(buf));
 
-        if (po->argname) {
-            av_strlcat(buf, " ", sizeof(buf));
-            av_strlcat(buf, po->argname, sizeof(buf));
-        }
+        if (po->argname)
+            av_strlcatf(buf, sizeof(buf), " <%s>", po->argname);
+
         printf("-%-17s  %s\n", buf, po->help);
     }
     printf("\n");