OSDN Git Service

rename '_sys' to 'cli'
authorscribu <mail@scribu.net>
Mon, 24 Jun 2013 13:40:27 +0000 (16:40 +0300)
committerscribu <mail@scribu.net>
Mon, 24 Jun 2013 13:40:27 +0000 (16:40 +0300)
php/WP_CLI/Runner.php
php/commands/cli.php [moved from php/commands/_sys.php with 90% similarity]

index 17426a0..87fee00 100644 (file)
@@ -231,11 +231,11 @@ class Runner {
                        unset( $assoc_args['json'] );
                }
 
-               // --{version|info}  ->  _sys {version|info}
+               // --{version|info}  ->  cli {version|info}
                if ( empty( $args ) ) {
                        foreach ( array( 'version', 'info' ) as $key ) {
                                if ( isset( $assoc_args[ $key ] ) ) {
-                                       $args = array( '_sys', $key );
+                                       $args = array( 'cli', $key );
                                        break;
                                }
                        }
similarity index 90%
rename from php/commands/_sys.php
rename to php/commands/cli.php
index fefbc22..b371c23 100644 (file)
@@ -4,9 +4,11 @@ use \WP_CLI\Dispatcher,
        \WP_CLI\Utils;
 
 /**
+ * Get information about WP-CLI itself.
+ *
  * @when before_wp_load
  */
-class Sys_Command extends WP_CLI_Command {
+class CLI_Command extends WP_CLI_Command {
 
        private function command_to_array( $command ) {
                $dump = array(
@@ -55,5 +57,5 @@ class Sys_Command extends WP_CLI_Command {
        }
 }
 
-WP_CLI::add_command( '_sys', 'Sys_Command' );
+WP_CLI::add_command( 'cli', 'CLI_Command' );