Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

(Fixes issue 629)

  • Loading branch information...
commit 395a41b5bbc3159b1e529a66c1bd0683e276e232 1 parent 8cf40b2
qiang.xue authored
View
1  CHANGELOG
@@ -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)
View
4 framework/cli/commands/ShellCommand.php
@@ -30,7 +30,7 @@ public function getHelp()
DESCRIPTION
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;
$_runner_->addCommands(dirname(__FILE__).'/shell');
$_runner_->addCommands(Yii::getPathOfAlias('application.commands.shell'));
+ if(($_path_=@getenv('YIIC_SHELL_COMMAND_PATH'))!==false)
+ $_runner_->addCommands($_path_);
$_commands_=$_runner_->commands;
while(($_line_=$this->readline("\n>> "))!==false)
View
12 framework/cli/commands/shell/HelpCommand.php
@@ -38,7 +38,17 @@ public function run($args)
$commandNames=array_keys($commands);
sort($commandNames);
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.
+
+EOD;
}
else
echo $runner->createCommand($name)->getHelp();
Please sign in to comment.
Something went wrong with that request. Please try again.