@@ -77,6 +77,16 @@ public function setHelp($help)
77
77
$ this ->setup ['' ]['help ' ] = $ help ;
78
78
}
79
79
80
+ /**
81
+ * Sets the help text for the tools commands itself
82
+ *
83
+ * @param string $help
84
+ */
85
+ public function setCommandHelp ($ help )
86
+ {
87
+ $ this ->setup ['' ]['commandhelp ' ] = $ help ;
88
+ }
89
+
80
90
/**
81
91
* Register the names of arguments for help generation and number checking
82
92
*
@@ -342,6 +352,8 @@ public function help()
342
352
$ text = '' ;
343
353
344
354
$ hascommands = (count ($ this ->setup ) > 1 );
355
+ $ commandhelp = $ this ->setup ["" ]["commandhelp " ]
356
+ ?: 'This tool accepts a command as first parameter as outlined below: ' ;
345
357
foreach ($ this ->setup as $ command => $ config ) {
346
358
$ hasopts = (bool )$ this ->setup [$ command ]['opts ' ];
347
359
$ hasargs = (bool )$ this ->setup [$ command ]['args ' ];
@@ -441,7 +453,7 @@ public function help()
441
453
$ text .= "\n" ;
442
454
$ text .= $ tf ->format (
443
455
array ($ mv , '* ' ),
444
- array ('' , ' This tool accepts a command as first parameter as outlined below: ' )
456
+ array ('' , $ commandhelp )
445
457
);
446
458
$ text .= "\n" ;
447
459
}
0 commit comments