From 5a25c976b895d83d6e941ee65152e8b82373aca5 Mon Sep 17 00:00:00 2001 From: Greg Anderson Date: Mon, 6 Dec 2010 06:00:28 +0000 Subject: [PATCH] #989674 by greg.1.anderson: Reorganize topics and docs --- README.txt | 4 ++++ commands/{docs => core}/docs.drush.inc | 10 +++++----- commands/{docs => core}/topic.drush.inc | 4 ++-- {commands/docs => docs}/bootstrap.txt | 0 {commands/docs => docs}/commands.txt | 0 {commands/docs => docs}/context.txt | 0 drush.api.php => docs/drush.api.php | 0 {commands/docs => docs}/shellscripts.txt | 0 8 files changed, 11 insertions(+), 7 deletions(-) rename commands/{docs => core}/docs.drush.inc (89%) rename commands/{docs => core}/topic.drush.inc (96%) rename {commands/docs => docs}/bootstrap.txt (100%) rename {commands/docs => docs}/commands.txt (100%) rename {commands/docs => docs}/context.txt (100%) rename drush.api.php => docs/drush.api.php (100%) rename {commands/docs => docs}/shellscripts.txt (100%) diff --git a/README.txt b/README.txt index 01dbfe7331..ab2ac01d28 100644 --- a/README.txt +++ b/README.txt @@ -111,6 +111,10 @@ Use the 'help' command to get a list of available options and commands: $ drush help +For even more documentation, use the 'topic' command: + + $ drush topic + For multisite installations, you might need to use the -l or other command line options just to get drush to work: diff --git a/commands/docs/docs.drush.inc b/commands/core/docs.drush.inc similarity index 89% rename from commands/docs/docs.drush.inc rename to commands/core/docs.drush.inc index 81dbd7e39e..e0a080c173 100644 --- a/commands/docs/docs.drush.inc +++ b/commands/core/docs.drush.inc @@ -50,7 +50,7 @@ function docs_drush_command() { 'topic' => TRUE, 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, 'callback' => 'drush_print_file', - 'callback arguments' => array(DRUSH_BASE_PATH . '/commands/docs/bootstrap.txt'), + 'callback arguments' => array(DRUSH_BASE_PATH . '/docs/bootstrap.txt'), ); $items['docs-scripts'] = array( 'description' => dt('Overview on how to write drush shell scripts.'), @@ -58,7 +58,7 @@ function docs_drush_command() { 'topic' => TRUE, 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, 'callback' => 'drush_print_file', - 'callback arguments' => array(DRUSH_BASE_PATH . '/commands/docs/shellscripts.txt'), + 'callback arguments' => array(DRUSH_BASE_PATH . '/docs/shellscripts.txt'), ); $items['docs-commands'] = array( 'description' => dt('Overview on how to write drush commands.'), @@ -66,7 +66,7 @@ function docs_drush_command() { 'topic' => TRUE, 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, 'callback' => 'drush_print_file', - 'callback arguments' => array(DRUSH_BASE_PATH . '/commands/docs/commands.txt'), + 'callback arguments' => array(DRUSH_BASE_PATH . '/docs/commands.txt'), ); $items['docs-api'] = array( 'description' => dt('Drush API'), @@ -74,7 +74,7 @@ function docs_drush_command() { 'topic' => TRUE, 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, 'callback' => 'drush_print_file', - 'callback arguments' => array(DRUSH_BASE_PATH . '/drush.api.php'), + 'callback arguments' => array(DRUSH_BASE_PATH . '/docs/drush.api.php'), ); $items['docs-context'] = array( 'description' => dt('Drush Contexts'), @@ -82,7 +82,7 @@ function docs_drush_command() { 'topic' => TRUE, 'bootstrap' => DRUSH_BOOTSTRAP_DRUSH, 'callback' => 'drush_print_file', - 'callback arguments' => array(DRUSH_BASE_PATH . '/commands/docs/context.txt'), + 'callback arguments' => array(DRUSH_BASE_PATH . '/docs/context.txt'), ); $items['docs-examplescript'] = array( 'description' => dt('Example drush script'), diff --git a/commands/docs/topic.drush.inc b/commands/core/topic.drush.inc similarity index 96% rename from commands/docs/topic.drush.inc rename to commands/core/topic.drush.inc index 23a0e528ca..3427b292ff 100644 --- a/commands/docs/topic.drush.inc +++ b/commands/core/topic.drush.inc @@ -13,7 +13,7 @@ * An associative array describing your command(s). */ function topic_drush_command() { - $items['docs-topic'] = array( + $items['core-topic'] = array( 'description' => 'Read detailed documentation on a given topic.', 'arguments' => array( 'topic name' => 'The name of the topic you wish to view. If omitted, list all topic descriptions (and names in parenthesis).', @@ -51,7 +51,7 @@ function topic_drush_help_alter($command) { * @param string $topic_name * A command name. */ -function drush_topic_docs_topic($topic_name = NULL) { +function drush_topic_core_topic($topic_name = NULL) { $commands = drush_get_commands(); if (is_null($topic_name)) { // Show choice list. diff --git a/commands/docs/bootstrap.txt b/docs/bootstrap.txt similarity index 100% rename from commands/docs/bootstrap.txt rename to docs/bootstrap.txt diff --git a/commands/docs/commands.txt b/docs/commands.txt similarity index 100% rename from commands/docs/commands.txt rename to docs/commands.txt diff --git a/commands/docs/context.txt b/docs/context.txt similarity index 100% rename from commands/docs/context.txt rename to docs/context.txt diff --git a/drush.api.php b/docs/drush.api.php similarity index 100% rename from drush.api.php rename to docs/drush.api.php diff --git a/commands/docs/shellscripts.txt b/docs/shellscripts.txt similarity index 100% rename from commands/docs/shellscripts.txt rename to docs/shellscripts.txt