Skip to content

Support --validator-dir and other flags after subcommands #3768

@michaelsproul

Description

@michaelsproul

Description

In the Lighthouse account manager currently the validator-dir flag needs to come directly after the validator subcommand, which gives it quite poor UX and discoverability.

i.e. you need to write

lighthouse account validator --validator-dir /path import --keystores /blah

but can't write

lighthouse account validator import --validator-dir /path --keystores /blah

Version

Lighthouse v3.3.0

Steps to resolve

I think there are options in clap (our CLI parser) to mark certain flags as global. I'm not sure if global is overkill though, I should hope it only applies from that subcommand down and not all the way up to the top-level lighthouse command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions