You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an option provides a completionProvider that list strings with spaces, the autocomplete doesn't honor the completion provider, but instead splits all options on its own.
It's on Bash / Zsh. By the time compgen -W is invoked, the list is already plain as John Doe Michael Scott John Sena, so compgen does it's thing.
For what I've seen, escaping here doesn't help, but there are some workarounds… I may give it a go with a PR, but will let you know if I run into trouble.
jsotuyod
added a commit
to jsotuyod/picocli
that referenced
this issue
Jul 28, 2022
- Both positional params and option candidates are now stored in the autocomplete script as an array.
- By setting `IFS=$'\n'` for those scenarios, each array entry is treated as a single candidate,
allowing to honor any spaces in the original suggestions coded by the user.
- Both positional params and option candidates are now stored in the autocomplete script as an array.
- By setting `IFS=$'\n'` for those scenarios, each array entry is treated as a single candidate,
allowing to honor any spaces in the original suggestions coded by the user.
When an option provides a
completionProvider
that list strings with spaces, the autocomplete doesn't honor the completion provider, but instead splits all options on its own.For instance, given the example:
I'd expect 3 candidates to be offered, with proper escaping for the whitespace. However, this is what it's actually being suggested:
5 options, all single words, duplicates removed.
The text was updated successfully, but these errors were encountered: