Skip to content
Browse files

(Fixes issue 629)

  • Loading branch information...
1 parent 8cf40b2 commit 395a41b5bbc3159b1e529a66c1bd0683e276e232 qiang.xue committed Dec 11, 2009
Showing with 15 additions and 2 deletions.
  1. +1 −0 CHANGELOG
  2. +3 −1 framework/cli/commands/ShellCommand.php
  3. +11 −1 framework/cli/commands/shell/HelpCommand.php
@@ -15,6 +15,7 @@ Version 1.0.11 to be released
- Bug #692: CHtml::listOptions() ignores the HTML options when handling nested options (Qiang)
- Bug #710: CRequiredValidator does not work as expected when its requiredValue is not null (Qiang)
- Bug: CQueue::peek() should return the first item in the queue (Qiang)
+- Enh #629: Added support for specifying shell command search path via an environment variable YIIC_SHELL_COMMAND_PATH (Qiang)
- Enh #643: Enhanced CAccessControlFilter::expression, COutputCache::varyByExpression and CExpressionDependency::expression so that they can use PHP callback (Qiang)
- Enh #665: Added support for using CStarRating to collect tabular input (Qiang)
- Enh #672: Added Italian translation of error views (Qiang)
4 framework/cli/commands/ShellCommand.php
@@ -30,7 +30,7 @@ public function getHelp()
This command allows you to interact with a Web application
- on the command line. It provides tools to automatically
+ on the command line. It also provides tools to automatically
generate new controllers, views and data models.
It is recommended that you execute this command under
@@ -127,6 +127,8 @@ protected function runShell()
$_runner_=new CConsoleCommandRunner;
+ if(($_path_=@getenv('YIIC_SHELL_COMMAND_PATH'))!==false)
+ $_runner_->addCommands($_path_);
while(($_line_=$this->readline("\n>> "))!==false)
12 framework/cli/commands/shell/HelpCommand.php
@@ -38,7 +38,17 @@ public function run($args)
echo ' - '.implode("\n - ",$commandNames);
- echo "\nType 'help <command-name>' for details about a command.\n";
+ echo <<<EOD
+Type 'help <command-name>' for details about a command.
+To expand the above command list, place your command class files
+under 'protected/commands/shell', or a directory specified
+by the 'YIIC_SHELL_COMMAND_PATH' environment variable. The command class
+must extend from CConsoleCommand.
echo $runner->createCommand($name)->getHelp();

0 comments on commit 395a41b

Please sign in to comment.
Something went wrong with that request. Please try again.