You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Completions can be called from Help and it's hard to make the distinction #1584
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):
Have you looked at the HelpBuilder.CustomizeSymbol APIs? I think these can be used to replace the default completions behavior but I'm not certain of it. If they can't be used this way then we should fix that. I'll give it a try as well and report back.
I had some difficulty reproducing this issue because I did not know that the default help displays the completions only for Argument and not for Option.
Activity
jonsequitur commentedon Jan 28, 2022
Have you looked at the
HelpBuilder.CustomizeSymbolAPIs? I think these can be used to replace the default completions behavior but I'm not certain of it. If they can't be used this way then we should fix that. I'll give it a try as well and report back.KalleOlaviNiemitalo commentedon Jun 17, 2022
I had some difficulty reproducing this issue because I did not know that the default help displays the completions only for Argument and not for Option.
command-line-api/src/System.CommandLine/Help/HelpBuilder.Default.cs
Lines 67 to 71 in 209b724