summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-cmd/accel-cmd.17
-rw-r--r--accel-cmd/accel_cmd.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/accel-cmd/accel-cmd.1 b/accel-cmd/accel-cmd.1
index ee2766ef..634b4e35 100644
--- a/accel-cmd/accel-cmd.1
+++ b/accel-cmd/accel-cmd.1
@@ -11,6 +11,10 @@ accel-cmd \- send commands to accel-ppp
.IR COMMAND "s to accel-ppp's tcp interface and displays the result on"
.RI "standard output. If no " COMMAND " is supplied, then"
.BR accel-cmd " reads and sends data from its standard input."
+.P
+The "help"
+.IR COMMAND " can be used to get information about available " COMMAND "s and "
+their syntax.
.SH OPTIONS
.TP
.BR \-f " \fIFAMILY\fR, " \-\-family "=\fIFAMILY\fR"
@@ -52,6 +56,9 @@ Display version number and exit.
Display help message and exit.
.SH EXAMPLES
.TP
+Get information about available commands:
+$ accel-cmd help
+.TP
Send the "show sessions" command to accel-ppp on localhost and display \
the result on standard output:
$ accel-cmd show sessions
diff --git a/accel-cmd/accel_cmd.c b/accel-cmd/accel_cmd.c
index e392d214..d73c9c24 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)