Removing double header output and adding some pizazz to the command list.

This commit is contained in:
mark_story 2010-10-03 23:48:43 -04:00
parent 7719df72c2
commit 9a6b04d5b3

View file

@ -30,18 +30,18 @@ class CommandListShell extends Shell {
* @return void * @return void
*/ */
public function main() { public function main() {
$this->out("Current Paths:"); $this->out("<info>Current Paths:</info>", 2);
$this->out(" -app: ". $this->params['app']); $this->out(" -app: ". $this->params['app']);
$this->out(" -working: " . rtrim($this->params['working'], DS)); $this->out(" -working: " . rtrim($this->params['working'], DS));
$this->out(" -root: " . rtrim($this->params['root'], DS)); $this->out(" -root: " . rtrim($this->params['root'], DS));
$this->out(" -core: " . rtrim(CORE_PATH, DS)); $this->out(" -core: " . rtrim(CORE_PATH, DS));
$this->out(""); $this->out("");
$this->out("Changing Paths:"); $this->out("<info>Changing Paths:</info>", 2);
$this->out("your working path should be the same as your application path"); $this->out("Your working path should be the same as your application path");
$this->out("to change your path use the '-app' param."); $this->out("to change your path use the '-app' param.");
$this->out("Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp"); $this->out("Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp", 2);
$this->out("\nAvailable Shells:"); $this->out("<info>Available Shells:</info>", 2);
$shellList = array(); $shellList = array();
foreach ($this->Dispatch->shellPaths as $path) { foreach ($this->Dispatch->shellPaths as $path) {
if (!is_dir($path)) { if (!is_dir($path)) {
@ -94,7 +94,8 @@ class CommandListShell extends Shell {
$this->out(" " . $row); $this->out(" " . $row);
} }
} }
$this->out("\nTo run a command, type 'cake shell_name [args]'"); $this->out();
$this->out("To get help on a specific command, type 'cake shell_name help'"); $this->out("To run a command, type 'cake shell_name [args]'");
$this->out("To get help on a specific command, type 'cake shell_name help'", 2);
} }
} }