cli: add short command descriptions to their help text
[deliverable/barectf.git] / barectf / cli.py
index e39c86194adee8bbcb810e9d5d9351c049ced606..1653a759805398b0b0c1f7441be662a87f491072 100644 (file)
@@ -155,10 +155,15 @@ def _print_gen_cmd_usage():
                         [--metadata-dir=DIR] [--prefix=PREFIX]
                         [--include-dir=DIR]... [--ignore-include-not-found]
                         CONFIG-FILE-PATH
+       barectf generate --help
+
+Generate the C source and CTF metadata stream files of a tracer from the
+configuration file CONFIG-FILE-PATH.
 
 Options:
   -c DIR, --code-dir=DIR        Write C source files to DIR instead of the CWD
   -H DIR, --headers-dir=DIR     Write C header files to DIR instead of the CWD
+  -h, --help                    Show this help and quit
   --ignore-include-not-found    Continue to process the configuration file when
                                 included files are not found
   -I DIR, --include-dir=DIR     Add DIR to the list of directories to be
@@ -215,8 +220,13 @@ def _show_effective_cfg_cmd_usage():
     print('''Usage: barectf show-effective-configuration [--include-dir=DIR]...
                                             [--ignore-include-not-found]
                                             [--indent-spaces=COUNT] CONFIG-FILE-PATH
+       barectf show-effective-configuration --help
+
+Print the effective configuration file for a the configuration file
+CONFIG-FILE-PATH.
 
 Options:
+  -h, --help                    Show this help and quit
   --ignore-include-not-found    Continue to process the configuration file when
                                 included files are not found
   -I DIR, --include-dir=DIR     Add DIR to the list of directories to be
@@ -264,7 +274,13 @@ def _show_effective_cfg_cfg_from_args(orig_args):
 
 
 def _show_cfg_version_cmd_usage():
-    print('Usage: barectf show-configuration-version CONFIG-FILE-PATH')
+    print('''Usage: barectf show-configuration-version CONFIG-FILE-PATH
+       barectf show-configuration-version --help
+
+Print the major version (2 or 3) of the configuration file CONFIG-FILE-PATH.
+
+Options:
+  -h, --help    Show this help and quit''')
 
 
 # Returns a configuration version showing command object from the
@@ -300,14 +316,14 @@ General options:
 Available commands:
   gen:
   generate:
-    Generate the C source and CTF metadata files of a tracer from a
+    Generate the C source and CTF metadata stream files of a tracer from a
     configuration file.
 
   show-effective-configuration:
   show-effective-config:
   show-effective-cfg:
-    Print the effective configuration file for a given configuration
-    file and inclusion directories.
+    Print the effective configuration file for a given configuration file and
+    inclusion directories.
 
   show-configuration-version:
   show-config-version:
This page took 0.024039 seconds and 4 git commands to generate.