Skip to content

Commit ab7ac1f

Browse files
committed
Minor readme edits
1 parent ac55748 commit ab7ac1f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
Automatic BASH completion for Symfony Console Component based applications. Completes commands and options by default, and allows for custom option/argument completion handlers to be set.
44

5-
**Note that this is not entirely finished:**
6-
7-
* Long-form options do not support completion yet (only shortcuts do)
8-
95
## Use
106

11-
If you don't need any custom completion behaviour, just add an instance of `CompletionCommand` to your application's `Application::getDefaultCommands()` method. Once you've done this, you can run (or add to your bash profile):
7+
If you don't need any custom completion behaviour, just add an instance of `CompletionCommand` to your application's `Application::getDefaultCommands()` method. Once you've done this, you can run this to enable completion:
128

13-
eval `[your-application] _completion --genhook`
9+
eval `[your-application] _completion -g [program-name]`
10+
11+
Where `[program-name]` is the name you want to register bash completion for.
1412

1513
This will generate and run a small bash script which creates a small BASH function and registers completion for your appliction name. Completion is then handled by running your application as `[your-application] _completion`.
1614

1715
### Custom completion
1816

19-
Custom completion behaviour for arguments and option values can be added by sub-classing `CompletionCommand` (this will change very soon):
17+
Custom completion behaviour for arguments and option values can be added by sub-classing `CompletionCommand`:
2018

2119

22-
class BeamCompletionCommand extends CompletionCommand{
20+
class MyCompletionCommand extends CompletionCommand{
2321

2422
protected function runCompletion()
2523
{
@@ -77,6 +75,8 @@ This will complete for both commands:
7775

7876
Option handlers work the same way as argument handlers, except you use `Completion::TYPE_OPTION` for the type.
7977

78+
**Note this functionality is not yet complete:** long-form options (eg `--hello="world"`) do not support completion yet. Only option shortcut completion works (eg. `-h [tab]`).
79+
8080
Completion::makeGlobalHandler(
8181
'weather', Completion::TYPE_OPTION,
8282
array('raining', 'sunny', 'everything is on fire!')

0 commit comments

Comments
 (0)