cli icon indicating copy to clipboard operation
cli copied to clipboard

Is there a way to declare global options (global flags) to be printed with every command?

Open dsotirakis opened this issue 4 years ago • 1 comments

my question is...

Is there a way to declare global options (global flags) to be printed with every command?

Hi,

I am looking for a way to be able to have global options printed regardless of whether the command is a top-level or a sub command.

One solution that I came up with was to make the flags a Global var and then pass it through my top-level flags and through sub-command flags, but that doesn't seem to be what I seek, since in the second case the flags are been shown like OPTIONS rather than GLOBAL OPTIONS.

Again, if a subcommand has another flag, then those "global flags" are overridden and are not being shown at all.

Followed the issue #795, but that didn't seem to find what I was looking for.

Anyone has any idea on if there's something I can use?

Thanks!

dsotirakis avatar Feb 12 '21 10:02 dsotirakis

This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.

stale[bot] avatar Aug 24 '21 18:08 stale[bot]

No way to do it right now. Nothing is planned for it yet

dearchap avatar Oct 21 '22 19:10 dearchap