diff options
Diffstat (limited to 'eurephiadm/eurephiadm.c')
-rw-r--r-- | eurephiadm/eurephiadm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/eurephiadm/eurephiadm.c b/eurephiadm/eurephiadm.c index b6c54c6..7375b21 100644 --- a/eurephiadm/eurephiadm.c +++ b/eurephiadm/eurephiadm.c @@ -57,9 +57,10 @@ int cmd_Help(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg, int a int i; char *prg = NULL; - // Print the modules help screen if it is given - if( argc > 1 ) { - char *help = (strlen_nullsafe(argv[2]) > 0 ? argv[2] : argv[1]); + // Print the modules help screen if module name is given + if( ((argc == 2) && (strcmp(argv[0], "help") == 0)) + || ((argc == 3) && (*argv[1] == '-')) ) { + char *help = (argc == 2 ? argv[1] : argv[2]); for( i = 0; cmdline_functions[i].command != NULL; i++ ) { func = (eurephiadm_functions *)&cmdline_functions[i]; |