File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,16 @@ public function setHelp($help)
7777 $ this ->setup ['' ]['help ' ] = $ help ;
7878 }
7979
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+
8090 /**
8191 * Register the names of arguments for help generation and number checking
8292 *
@@ -342,6 +352,8 @@ public function help()
342352 $ text = '' ;
343353
344354 $ hascommands = (count ($ this ->setup ) > 1 );
355+ $ commandhelp = $ this ->setup ["" ]["commandhelp " ]
356+ ?: 'This tool accepts a command as first parameter as outlined below: ' ;
345357 foreach ($ this ->setup as $ command => $ config ) {
346358 $ hasopts = (bool )$ this ->setup [$ command ]['opts ' ];
347359 $ hasargs = (bool )$ this ->setup [$ command ]['args ' ];
@@ -441,7 +453,7 @@ public function help()
441453 $ text .= "\n" ;
442454 $ text .= $ tf ->format (
443455 array ($ mv , '* ' ),
444- array ('' , ' This tool accepts a command as first parameter as outlined below: ' )
456+ array ('' , $ commandhelp )
445457 );
446458 $ text .= "\n" ;
447459 }
You can’t perform that action at this time.
0 commit comments