Open JanKrivanek opened 2 years ago
I was having the same error when I increased the Arity of Argument<string>
, but all I had to do was changing it to Argument<string[]>
@Drizin Good point! Changing Option<string>
to Option<string[]>
in the above sample resolved the exception.
Though it still doesn't produce the expected completion (empty result is returned).
I'm failing to get proper behavior for some cases of tab copletion of multiple arity option. I've simplified my case to following simple repro:
Observed behavior: This fails already during
Parse
call:with
System.ArgumentException : Type System.String cannot be created without a custom binder.
Looks like
TryConvertArgument
attempts for multiple arity options to interpret string argument as enumeration (https://github.com/dotnet/command-line-api/blob/main/src/System.CommandLine/Binding/ArgumentConverter.cs#L229)Expected behavior: The above test case works as is.
Let me know if there is any further setup needed to make completions work as expected for multi-arity options.