Skip to content

Commit 2fd8cae

Browse files
committed
Remove another reference to beam
1 parent ab7ac1f commit 2fd8cae

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ If you don't need any custom completion behaviour, just add an instance of `Comp
88

99
eval `[your-application] _completion -g [program-name]`
1010

11-
Where `[program-name]` is the name you want to register bash completion for.
11+
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.
1212

13-
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`.
13+
This will generate and run a small bash script which creates a small wrapper function and registers completion for your appliction name. Completion is then handled by running your application as `[your-application] _completion`.
1414

1515
### Custom completion
1616

src/Stecman/Component/Symfony/Console/BashCompletion/CompletionHandler.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,14 @@ public function generateBashCompletionHook($programName)
354354
{
355355
global $argv;
356356
$command = $argv[0];
357+
$funcName = "_{$programName}complete";
357358

358359
return <<<"END"
359-
function _beamcomplete {
360+
function $funcName {
360361
export COMP_CWORD COMP_KEY COMP_LINE COMP_POINT COMP_WORDBREAKS;
361362
COMPREPLY=(`compgen -W "$($command _completion)"`);
362363
};
363-
complete -F _beamcomplete $programName;
364+
complete -F $funcName $programName;
364365
END;
365366
}
366367

0 commit comments

Comments
 (0)