-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Support dynamic value of argument completion #5621
Conversation
Thanks for your review! Do you think it is necessary to prevent the spread of user code errors? I think it may be necessary, because the completion code is executed implicitly, and if the spread of errors is not prevented, it may cause confusion to users. Also, I think my current implementation is not good, maybe we can use other rust tools or crates to do this. |
If the user wants panic prevention, they can provide it. I don't think we need to be doing it for them
Which parts are you concerned about? Do you have something in mind? |
I mean the panic prevention part. I want to let the user code execute in a sandbox so as not to affect other possible completions. |
a2534e4
to
0ff617a
Compare
0ff617a
to
77c3efc
Compare
77c3efc
to
9410401
Compare
9410401
to
fd5f2fa
Compare
fd5f2fa
to
0dd7cdc
Compare
|
0dd7cdc
to
3239c02
Compare
3239c02
to
7fd7b3e
Compare
Related issue #1232
Work in this PR
CustomCompleter
trait andArgValueCompleter
struct to provide users a way to add custom value of argument completion.What may be left
ArgMatches
before the builder of theCommand
. We add custom value hint in builder now. If we really need this feat, we may need to do more things.