This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Description
As far as I can tell, when specifying ArgumentsRule for an argument, the options for specifying suggestions are:
- static list:
public static ArgumentsRule WithSuggestionsFrom(this ArgumentsRule rule, params string[] values)
- dynamic list based on the current value of the argument:
public static ArgumentsRule WithSuggestionsFrom(this ArgumentsRule rule, Func<string, IEnumerable<string>> suggest)
But for https://github.com/dotnet/cli/issues/9172, I would like for the suggestion function to know not just the value of the argument being suggested, but also values of other arguments. That way, e.g. dotnet add package Microsoft.CodeAnalysis -v <Tab> could get the name of the package (Microsoft.CodeAnalysis) to query an API for a list of its versions.
The necessary information seems to be already contained in the ParseResult that's passed to ArgumentsRule.Suggest(), but there doesn't seem to be a way to access that from the suggestion function.
Or am I missing something and there is already a way to do this?