8000 New Feature: Change the Default Command in the Console component by dcsg · Pull Request #3426 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content
8000

New Feature: Change the Default Command in the Console component #3426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 9, 2014
Prev Previous commit
Applied suggestions from Ryan
  • Loading branch information
dcsg committed Jan 9, 2014
commit c1b2aad00e47ddd9c02732f24ed2ce3960210e03
8 changes: 4 additions & 4 deletions components/console/changing_default_command.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. index::
single: Console; Changing the Default Command
single: Console; Changing the Default Command

Changing the Default Command
============================
Expand All @@ -8,7 +8,7 @@ Changing the Default Command
The :method:`Symfony\\Component\\Console\\Application::setDefaultCommand`
method was introduced in version 2.5.

By default the Application will always run the ``ListCommand``. In order to change
will always run the ``ListCommand`` when no command name is passed. In order to change
the default command you just need to pass the command name you want to run by
default to the ``setDefaultCommand`` method::

Expand Down Expand Up @@ -45,7 +45,7 @@ Executing the application and changing the default Command::
$application->setDefaultCommand($command->getName());
$application->run();

Test the new default console command by running the following
Test the new default console command by running the following:

.. code-block:: bash

Expand All @@ -59,7 +59,7 @@ This will print the following to the command line:

.. tip::

The feature was a limitation since you cannot use the Command ``arguments``.
This feature has a limitation: you cannot use it with any Command arguments.

Learn More!
-----------
Expand Down
2 changes: 1 addition & 1 deletion components/console/single_command_tool.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. index::
single: Console; Single command application
single: Console; Single command application

Building a Single Command Application
=====================================
Expand Down
3 changes: 2 additions & 1 deletion components/map.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

* :doc:`/components/console/introduction`
* :doc:`/components/console/usage`
* :doc:`/components/console/changing_default_behavior`
* :doc:`/components/console/single_command_tool`
* :doc:`/components/console/changing_default_command`
* :doc:`/components/console/events`
* :doc:`/components/console/helpers/index`

Expand Down
0