diff --git a/src/Composer/Command/HelpCommand.php b/src/Composer/Command/HelpCommand.php new file mode 100644 index 000000000..1b2546f9e --- /dev/null +++ b/src/Composer/Command/HelpCommand.php @@ -0,0 +1,45 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Command; + +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +/** + * @author Jordi Boggiano + */ +class HelpCommand extends Command +{ + protected function configure() + { + $this + ->setName('help') + ->setDescription('') + ->setHelp(<<php composer.phar help +EOT + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln(<<Composer - Package Management for PHP +Composer is a package manager tracking local dependencies of your projects and libraries. +See http://packagist.org/about for more information. +EOT + ); + + } +} diff --git a/src/Composer/Console/Application.php b/src/Composer/Console/Application.php index b34607eee..034845b91 100644 --- a/src/Composer/Console/Application.php +++ b/src/Composer/Console/Application.php @@ -63,6 +63,7 @@ class Application extends BaseApplication */ protected function registerCommands() { + $this->add(new Command\HelpCommand()); $this->add(new Command\InstallCommand()); $this->add(new Command\UpdateCommand()); $this->add(new Command\DebugPackagesCommand());