feat(complete): Only complete flags in PowerShell when word starts with -#6081
feat(complete): Only complete flags in PowerShell when word starts with -#6081MatejKafka wants to merge 1 commit intoclap-rs:masterfrom
-#6081Conversation
|
Note that we generally ask for Issues to be created so we can get alignment before moving onto issues. This avoids wasted time on both sides and helps provide a central point of discussion as multiple PRs may end up existing for one root cause for various reasons. Our focus is shifting to our new completion system (#3166). While we can still improve the existing completions, I would prefer it to be done in a way that is aligned with #3166. Currently, #3166 generates all completions in a shell-agnostic way. Each shell only has a thin adapter. This means most likely that the problem exists there too. So the question is how should we handle this in #3166. Some options:
|
|
Sounds reasonable. I'd still like to fix this for the older completions in the meantime before the new completion engine is released. Few observations:
|
|
PRs are not a place to be discussing what should be done, see again
|
|
In PowerShell, built-in completion system only completes parameter (flag) names when you type a
-(dash), otherwise it assumes that you're entering a positional parameter value (or a subcommand). The completion script generated byclap_completedoes not replicate this behavior, which feels out-of-place compared to the built-in completers.This PR fixes the behavior to match built-in PowerShell completions.