Skip to content
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

Update README.md #77

Merged
merged 1 commit into from Jul 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Expand Up @@ -23,7 +23,7 @@ If you don't need any custom completion behaviour, you can simply add the comple
$ composer require stecman/symfony-console-completion
```

2. Add an instance of `CompletionCommand` to your application's `Application::getDefaultCommands()` method:
2. For standalone Symfony Console applications, add an instance of `CompletionCommand` to your application's `Application::getDefaultCommands()` method:

```php
protected function getDefaultCommands()
Expand All @@ -33,6 +33,18 @@ If you don't need any custom completion behaviour, you can simply add the comple
//...
}
```

For Symfony Framework applications, register the `CompletionCommand` as a service in `app/config/services.yml`:

```yaml
services:
#...
console.completion_command:
class: Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand
tags:
- { name: console.command }
#...
```

3. Register completion for your application by running one of the following in a terminal, replacing `[program]` with the command you use to run your application (eg. 'composer'):

Expand Down