-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completing a CLI with <mask>... <file>
never offers <file>
completions with Rust native completions
#5701
Comments
This is parsing two positionals in a row with the first positional's length being unbounded. This is a very complicated case in the parser that we've not covered yet with the new completions. Currently, our quality bar is "is it as good as the old completions". If you happened to use the old completions before and can report back on its behavior in this scenario, that can help us prioritize this. See clap/clap_builder/src/parser/parser.rs Lines 288 to 358 in fe81090
What will be interesting about this case is that To help in showing either completion, we should probably group completions by their argument by default (see #5651). |
@epage not sure what you mean with "old completions"? Is there any older clap_complete release which I should try to see if the completions for my scenario work with? |
|
<mask>... <file>
never offers <file>
completions with Rust native completions
Please complete the following tasks
Rust Version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
Clap Version
clap 4.5.16, clap_complete 4.5.23
Minimal reproducible code
Steps to reproduce the bug with the above code
cmdtest foo AND PRESSING TAB
Actual Behaviour
As completion candidates I only get "foo" and "baz"
Expected Behaviour
I was expecting to "foo", "baz" and the files in the current folder as completion candidates.
Additional Context
After the first argument for
mask
is passed, the next argument could either be amask
or afile
so I was expecting to get completions for both but I only get completions formask
.I am using zsh.
Debug Output
No response
The text was updated successfully, but these errors were encountered: