Skip to content

Commit 7b5a2a2

Browse files
committed
Merge branch 'master' of github.com:stecman/symfony-console-completion
2 parents 69defa6 + 7fed858 commit 7b5a2a2

File tree

7 files changed

+538
-23
lines changed

7 files changed

+538
-23
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ If you don't need any custom completion behaviour:
1717
}
1818
```
1919

20-
3. Run `eval $([your-application] _completion -g [program-name])` in a terminal, where `[program-name]` is the name you want to register bash completion for (this will be the same as `[your-application]` if your application is on your PATH).
20+
3. Run `eval $([program] _completion -g)` in a terminal.
2121
4. Add the above command to your bash profile if you want the completion to apply automatically for new terminal sessions.
2222

23-
The command `_completion -g [program-name]` (`-g` being a shortcut for `--genhook`) generates a few lines of bash that, when run, register your application as a completion handler for `[program-name]`. Completion is handled by running the completion command on your application with no arguments: `[your-application] _completion`.
23+
The `-g` option generates a few lines of bash that, when run, register your application as a completion handler for your program name. Completion is handled by running the completion command on your application with no arguments: `[program] _completion`.
24+
25+
If you need to use completion with an alias, specify the program name to complete for with the `-p` option: `_completion -g -p [alias-name]`.
2426

2527
## Custom completion
2628

0 commit comments

Comments
 (0)