Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subcommand --help doesn't show global options #29

Open
tersec opened this issue Feb 5, 2021 · 2 comments
Open

subcommand --help doesn't show global options #29

tersec opened this issue Feb 5, 2021 · 2 comments

Comments

@tersec
Copy link
Contributor

tersec commented Feb 5, 2021

Even when they're required to usefully use the subcommand, e.g.,:

$ build/ncli_db bench --help
Usage: 

ncli_db bench [OPTIONS]...

The following options are available:

 --slots            Number of slots to run benchmark for.
 --storeBlocks      Store each read block back into a separate database.
 --printTimes       Print csv of block processing time.
 --resetCache       Process each block with a fresh cache.

But to use this subcommand, one has to also specify --db:

$ build/ncli_db  --help | head
Usage: 

ncli_db [OPTIONS]... command

The following options are available:

 --db           Directory where `nbc.sqlite` is stored.
 --network      The Eth2 network preset to use.

Available sub-commands:

So build/ncli_db bench --help does not document sufficiently how to use ncli_db bench.

@unixpi
Copy link

unixpi commented Jun 7, 2021

@zah came across this problem today. is it easy to fix?

@jangko
Copy link
Contributor

jangko commented Feb 20, 2022

we have compile time tree path selector to detect duplicate name and abbr. maybe we should display the help message using similar algorithm. The help text should be displayed in a heirarchical order if subcommand help requested.

see #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants