-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix command not set correctly when options precede the command name
The CompletionHandler code made an assumption that the command name was always the second word on the command line: $ [program-name] [command-name] [...arguments and options] This now searches for the first non-option-like word and stores its index for other parts of CompletionHandler to test against. The way ArrayInput is built in `CompletionHandler::getInput()` doesn't align with how the docs for that class expect it to be used, so calling `getFirstArgument()` was always returning the first value. Fixes #83
- Loading branch information
Showing
2 changed files
with
65 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters