File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,16 @@ public function setHelp($help)
6969 $ this ->setup ['' ]['help ' ] = $ help ;
7070 }
7171
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+
7282 /**
7383 * Register the names of arguments for help generation and number checking
7484 *
@@ -334,6 +344,8 @@ public function help()
334344 $ text = '' ;
335345
336346 $ hascommands = (count ($ this ->setup ) > 1 );
347+ $ commandhelp = $ this ->setup ["" ]["commandhelp " ]
348+ ?: 'This tool accepts a command as first parameter as outlined below: ' ;
337349 foreach ($ this ->setup as $ command => $ config ) {
338350 $ hasopts = (bool )$ this ->setup [$ command ]['opts ' ];
339351 $ hasargs = (bool )$ this ->setup [$ command ]['args ' ];
@@ -433,7 +445,7 @@ public function help()
433445 $ text .= "\n" ;
434446 $ text .= $ tf ->format (
435447 array ($ mv , '* ' ),
436- array ('' , ' This tool accepts a command as first parameter as outlined below: ' )
448+ array ('' , $ commandhelp )
437449 );
438450 $ text .= "\n" ;
439451 }
You can’t perform that action at this time.
0 commit comments