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
Consider a better word than "global" since it actually indicates that the option is syntactically valid on the current command and its subcommands #1904
Add(Option option, bool inheritable) would allow initializer list syntax; but the resulting code would not be very easy to understand. The bool could be replaced with OptionOptions.ValidInSubcommands but that would mean larger API and the name looks bad.
Activity
KalleOlaviNiemitalo commentedon Nov 5, 2022
Add(Option option, bool inheritable) would allow initializer list syntax; but the resulting code would not be very easy to understand. The bool could be replaced with OptionOptions.ValidInSubcommands but that would mean larger API and the name looks bad.
KalleOlaviNiemitalo commentedon Feb 28, 2023
This was done in #2060, by replacing Command.AddGlobalOption with Option.AppliesToSelfAndChildren.
KalleOlaviNiemitalo commentedon Feb 28, 2023
"AppliesToSelfAndChildren" would have been a bit misleading if #2063 had allowed directives as children of a command.
jonsequitur commentedon Mar 1, 2023
Thanks, @KalleOlaviNiemitalo. I'll close this one.