]> git.alsa-project.org Git - alsa-utils.git/commitdiff
axfer: print help text of command entry
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 7 Dec 2018 09:41:02 +0000 (18:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Fri, 7 Dec 2018 09:56:10 +0000 (10:56 +0100)
This commit adds help text of command entry. This is printed when
help subcommand is given, or a valid subcommand or a valid direction
are not given.

Unfortunately, at present, execution of alias (aplay/arecord) with help
options prints the added help text. It should print help options in
transfer subcommand. This bug will fixed in future commits.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
axfer/main.c

index f9ee44eff91bc1d2ae10ff0a1c7219277b050614..21d3b4aeecbf7dac55b9b9c6429da260b7d9e520 100644 (file)
@@ -67,7 +67,17 @@ static void print_version(const char *const cmdname)
 
 static void print_help(void)
 {
-       printf("help\n");
+       printf(
+"Usage:\n"
+"  axfer transfer DIRECTION OPTIONS\n"
+"  axfer list DIRECTION OPTIONS\n"
+"  axfer version\n"
+"  axfer help\n"
+"\n"
+"  where:\n"
+"    DIRECTION = capture | playback\n"
+"    OPTIONS = -h | --help | (subcommand specific)\n"
+       );
 }
 
 // Backward compatibility to aplay(1).