@@ -69,6 +69,16 @@ public function setHelp($help)
69
69
$ this ->setup ['' ]['help ' ] = $ help ;
70
70
}
71
71
72
+ /**
73
+ * Sets the help text for the tools commands itself
74
+ *
75
+ * @param string $help
76
+ */
77
+ public function setCommandHelp ($ help )
78
+ {
79
+ $ this ->setup ['' ]['commandhelp ' ] = $ help ;
80
+ }
81
+
72
82
/**
73
83
* Register the names of arguments for help generation and number checking
74
84
*
@@ -334,6 +344,8 @@ public function help()
334
344
$ text = '' ;
335
345
336
346
$ hascommands = (count ($ this ->setup ) > 1 );
347
+ $ commandhelp = $ this ->setup ["" ]["commandhelp " ]
348
+ ?: 'This tool accepts a command as first parameter as outlined below: ' ;
337
349
foreach ($ this ->setup as $ command => $ config ) {
338
350
$ hasopts = (bool )$ this ->setup [$ command ]['opts ' ];
339
351
$ hasargs = (bool )$ this ->setup [$ command ]['args ' ];
@@ -433,7 +445,7 @@ public function help()
433
445
$ text .= "\n" ;
434
446
$ text .= $ tf ->format (
435
447
array ($ mv , '* ' ),
436
- array ('' , ' This tool accepts a command as first parameter as outlined below: ' )
448
+ array ('' , $ commandhelp )
437
449
);
438
450
$ text .= "\n" ;
439
451
}
0 commit comments