stecman / symfony-console-completion

Automatic tab-key completion for Symfony console application options, arguments and parameters
MIT License
420 stars 26 forks source link

One letter argument value not being completed #65

Closed CarsonF closed 8 years ago

CarsonF commented 8 years ago

If I type bin/queue stats g and hit tab, I'm expecting it to complete to bin/queue stats guzzle but it doesn't.

Digging further I found CompletionContext is parsing the words as:

[
  "bin/queue",
  "stats",
  "",
  "g"
]

Changing CompletionContext.php L215

$cursor >= $this->charIndex

to

$cursor > $this->charIndex

seems to fix it for me. But I'm not sure about the other implications of this.

CarsonF commented 8 years ago

Wow, awesome thank you! :+1:

That looks much better than the hack I was attempting to PR :wink: