forked from clap-rs/clap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(completions): improve correctness of completions when whitespace …
…is involved compgen takes exactly one "word" argument; if multiple are passed, it will ignore all but the first. If `$cur` is not quoted and contains whitespace, it will be expanded into multiple words, so the completions will be based only on the first word of `$cur`, which is clearly not correct. To fix this, quote `$cur` to prevent word splitting, where necessary (Bash does not perform word splitting inside the extended test command `[[`, so quotes aren't necessary there).
- Loading branch information
Showing
2 changed files
with
25 additions
and
25 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