Skip to content

Commit 2561ea6

Browse files
committed
Document Symfony CLI autocompletion
1 parent 5f34920 commit 2561ea6

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

console.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ completion (by default, by pressing the Tab key).
9898
$ php vendor/bin/phpstan completion --help
9999
$ composer completion --help
100100
101+
.. tip::
102+
103+
If you are using the :doc:`Symfony local web server</setup/symfony_server>`,
104+
it is recommended to use the builtin completion script that will ensure the
105+
right PHP version and configuration is used when running the Console
106+
Completion. Run ``symfony completion --help`` for the installation
107+
instructions for your shell. The Symfony CLI will provide completion for the
108+
``console`` and ``composer`` commands.
109+
101110
Creating a Command
102111
------------------
103112

setup/symfony_server.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ Installation
1717
The Symfony server is part of the ``symfony`` binary created when you
1818
`install Symfony`_ and has support for Linux, macOS and Windows.
1919

20+
.. tip::
21+
22+
The Symfony CLI supports auto completion for Bash, Zsh or Fish shells. You
23+
have to install the completion script *once*. Run ``symfony completion
24+
--help`` for the installation instructions for your shell. After installing
25+
and restarting your terminal, you're all set to use completion (by default,
26+
by pressing the Tab key).
27+
28+
The Symfony CLI will also provide completion for the ``composer`` command
29+
and for the ``console`` command if it detects a Symfony project.
30+
2031
.. note::
2132

2233
You can view and contribute to the Symfony CLI source in the

0 commit comments

Comments
 (0)