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

Is there any way to add command description in -- --help #412

Open
joon612 opened this issue Oct 31, 2022 · 5 comments
Open

Is there any way to add command description in -- --help #412

joon612 opened this issue Oct 31, 2022 · 5 comments

Comments

@joon612
Copy link

joon612 commented Oct 31, 2022

I want to show some description of cmd when user typed in cmd -- --help.

@mwort
Copy link

mwort commented Nov 17, 2022

The description is taken from the doc strings of the cmd object (i.e. module, class, function).

@gaardhus
Copy link

I cannot seem to get module docstrings represented in --help

@siran
Copy link

siran commented Jan 22, 2023

I seem to have the same issue: the output from --help is not showing the available commands of my class...

@siran
Copy link

siran commented Jan 22, 2023

turns out it was a defail in the way I was launching, the correct way is fire.Fire(myClass()) and I was doing it like fire.Fire(myClass) that is without the ()

@klaerik
Copy link

klaerik commented Aug 8, 2023

The behavior does depend on whether or not the Class is instantiated, but I don't see that there is a way to get both the commands (methods) and flags (arguments) to show up.

  • If the class is not instantiated the flags show up in --help but not the commands.
  • If the class is instantiated, the commands show up but not the flags.

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

No branches or pull requests

5 participants