From d32c70edbc0ed4e4821deb5542ef11637e8c04e0 Mon Sep 17 00:00:00 2001 From: Matt Bacchi Date: Mon, 3 Feb 2003 23:15:58 +0000 Subject: [PATCH] cmd-print-help-in-cases-without-subcommands-20030203 FIXES 1277 so libcmd supports help for e.g. pt_util --- src/cmd/cmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmd/cmd.c b/src/cmd/cmd.c index 9419038bf..8cf2e2124 100644 --- a/src/cmd/cmd.c +++ b/src/cmd/cmd.c @@ -762,6 +762,9 @@ int cmd_Dispatch(int argc, char **argv) otherwise it is a real nuisance */ if (ts->parms[CMD_HELPPARM].items) { PrintSyntax(ts); + /* Display full help syntax if we don't have subcommands */ + if (noOpcodes) + PrintFlagHelp(ts); ResetSyntax(ts); return 0; } -- 2.39.5