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

helptext: display options for parent commands #179

Closed
wants to merge 3 commits into from

Conversation

eugene-babichenko
Copy link

This helps to understand which options are available for the given
subcommand without calling help for parent commands by providing more
informative output.

Resolves ipfs/kubo#6640

This helps to understand which options are available for the given
subcommand without calling help for parent commands by providing more
informative output.

Resolves ipfs/kubo#6640
@Stebalien
Copy link
Member

Thank you but I'm concerned that this will be too verbose in the common case (users usually don't care about the common options). Please see the design I proposed in ipfs/kubo#6640.

@eugene-babichenko
Copy link
Author

Missed the --help-all flag, thanks for pointing that out! Will fix this soon.

@Stebalien
Copy link
Member

Stebalien commented Oct 16, 2019 via email

Introduce the --help-all flag as specified in ipfs/kubo#6640. This
flag allows to call more verbose help only when it is necessary.
@eugene-babichenko
Copy link
Author

@Stebalien uploaded a couple of updates, they introduce --help-all and information on that flag in the help templates.

@Stebalien
Copy link
Member

Thank you for trying to implement this but this needs a lot of work and needs to actually be tested against go-ipfs.

  • ipfs bitswap wantlist --help-all:
USAGE
  ipfs bitswap wantlist - Show blocks currently on the wantlist.

SYNOPSIS
  ipfs bitswap wantlist 
                        [--peer=<peer> | -p]

OPTIONS

  -p, --peer  string - Specify which peer to show wantlist for. Default: self.
  
   <-- empty lines?
  
  bitswap <-- empty section.
               <-- no global flags?

DESCRIPTION

  Print out all blocks currently on the bitswap wantlist for the local peer.
  • ipfs bitswap wantlist --help doesn't tell me about "--help-all" but "-h" does.
  • ipfs --help-all crashes.

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

Successfully merging this pull request may close these issues.

Document global flags on sub-commands
2 participants