Open
Description
Currently if I don't want to show completions in the help text, I have to ressort to this method to detect if that was the help that called my completions (and that only works because I use subcommands):
private static bool IsHelpCall(CompletionContext context)
{
return context.ParseResult.CommandResult?.Command is RootCommand;
}
I'd like to have an API for this, maybe adding an enum "InvocationContext(Suggest|ShowHelp)" to the CompletionContext?
It's not crucial to the issue but here are a few reasons I want to show different results:
- completions can be slow to return
- there can be a lot of results, especially if WordToComplete is empty
- I just don't want to show them in the help text