picocli icon indicating copy to clipboard operation
picocli copied to clipboard

Honor spaces in autocomplete candidates

Open jsotuyod opened this issue 2 years ago • 3 comments

Fixes #1754

  • 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.
  • Values still need to be double-escaped for proper handling.

jsotuyod avatar Jul 29 '22 22:07 jsotuyod

Thank you for the PR! Checking...

remkop avatar Jul 30 '22 03:07 remkop

@remkop any feedback on this?

jsotuyod avatar Aug 16 '22 12:08 jsotuyod

Oops! Sorry for the long wait. I have not been able to spend much time on picocli recently... Also, this ticket seems related to https://github.com/remkop/picocli/issues/1644 , so I want to look at both together. I have not forgotten about it though!

remkop avatar Aug 18 '22 09:08 remkop

Merged. Thank you for the contribution!

remkop avatar Oct 31 '22 18:10 remkop

@remkop glad to help! Any rough timelines for 4.7?

jsotuyod avatar Oct 31 '22 18:10 jsotuyod

Started the release process now...

remkop avatar Oct 31 '22 19:10 remkop