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 }}
Repository navigation
Possibility to disable suggestions in help output #2035
Suggestions are currently showing in the help output. This is not always the desired behavior, for example when suggestions are long, or when there are many. Let assume a path argument with suggestions made from the file system, it might not be desired that those suggestions are listed in the help output.
Ideally there should be a way to determine if suggestions are for the help output, so these could be customized in this case (not suggesting at all, providing only the first three, or any strategy). Or at the minimum, disable suggestions in help for specific arguments / options entirely.
Activity
KalleOlaviNiemitalo commentedon Jan 26, 2023
AFAIK you can already hide the completions from help, by setting Argument.HelpName. See HelpBuilder.Default.GetArgumentUsageLabel:
command-line-api/src/System.CommandLine/Help/HelpBuilder.Default.cs
Lines 66 to 87 in 209b724
Related performance issue dotnet/sdk#27374 (comment), #2038.
mariopasquali commentedon Jan 26, 2023
Wow, thank you, I totally missed that! It might not be the most obvious feature but it definitively does the job.