Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
drush_help($section)
contributions/drush/drush.module, line 12
Implementation of hook_help()
<?php
function drush_help($section) {
switch ($section) {
case 'admin/help#drush':
include_once('drush.inc');
$output .= t('<p>Drush is a command line shell and Unix scripting interface for Drupal, a
veritable Swiss Army knife designed to make life easier for those of us who
spend most of our working hours hacking away at the command prompt.</p>');
// Usage
$output .= '<a name=\'usage\'><h3>' . t('Usage') . '</h3></a>';
$output .= '<p><code>drush.php [options] <command> <command> ...</code></p>';
// Options
$output .= '<a name=\'options\'><h3>' . t('Options') . '</h3></a>';
$options = drush_get_options();
$output .= "<dl>";
foreach ($options as $option => $description) {
$output .= '<dt>' . "<code>$option</code>" . '</dt>';
$output .= '<dd>' . $description . '</dd>';
}
$output .= "</dl>";
// Commands
$commands = drush_get_commands();
$output .= '<a name=\'commands\'><h3>' . t('Commands') . '</h3></a>';
$output .= "<dl>";
foreach ($commands as $command => $info) {
$output .= '<dt>' . "<code>drush.php $command</code>" . '</dt>';
$output .= '<dd>' . $info["description"] . '</dd>';
}
$output .= "</dl>";
return $output;
}
}
?>