From cfead0b09e56c0740d6dae50b8ac7a0b07c06dc4 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Wed, 12 Nov 2014 16:33:49 +0100 Subject: accel-cmd: improve help message New users typically use the -h or --help parameters to figure out how to use accel-cmd. But this only displays accel-cmd options, so users have no way to learn which accel-ppp commands are available. This patch improves the help message to introduce the "help" command which users can use to learn about other accel-ppp commands. Signed-off-by: Guillaume Nault --- accel-cmd/accel_cmd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'accel-cmd/accel_cmd.c') diff --git a/accel-cmd/accel_cmd.c b/accel-cmd/accel_cmd.c index e392d21..d73c9c2 100644 --- a/accel-cmd/accel_cmd.c +++ b/accel-cmd/accel_cmd.c @@ -556,9 +556,11 @@ static void print_help(const char *name) printf("\t-v, --verbose\t- Verbose output.\n"); printf("\t-V, --version\t- Display version number and exit.\n"); printf("\t-h, --help\t- Display this help message and exit.\n"); - printf("\n\tCOMMAND is the accel-ppp command line to be executed.\n"); - printf("\tIf no COMMAND is provided, then data read from standard" - " input is forwarded to accel-ppp.\n"); + printf("\n\tCOMMAND is the accel-ppp command line to be executed"); + printf(" (if omitted, commands are read from standard input).\n"); + printf("\tThe \"help\" command can be used (e.g. \"%s help\") to get" + " information about available commands and their syntax.\n", + name); } int main(int argc, char **argv) -- cgit v1.2.3