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

Add a COMMANDS section to generated man pages #939

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

orobardet
Copy link

This PR enhance the man generation with the ability to add a COMMANDS section in generated man page for sub-commands.

When a command has available sub-commands, the COMMANDS
man section is generated with the list of sub-commands, with
their name, short description, and the name of the dedicated
man page.

image

This fixes #680

@CLAassistant
Copy link

CLAassistant commented Aug 29, 2019

CLA assistant check
All committers have signed the CLA.

@orobardet orobardet force-pushed the add-COMMANDS-section-man-pages branch 3 times, most recently from 65614da to cfa3fa1 Compare August 30, 2019 09:14
@orobardet
Copy link
Author

I finished working on this PR, it's ready to be reviewed.

@github-actions
Copy link

github-actions bot commented Apr 4, 2020

This PR is being marked as stale due to a long period of inactivity

@orobardet
Copy link
Author

Is there anything to do or change to help on this PR?

@olivierlemasle
Copy link

cc @jharshman

@johnSchnake
Copy link
Collaborator

Would need fixed up to use a StringWriter instead of the bytes.Buffer. Untagged the issue as stale and mentioned it with maintainers to see if others want to see this merged.

@orobardet orobardet force-pushed the add-COMMANDS-section-man-pages branch from cfa3fa1 to 28b69df Compare April 20, 2022 09:11
@github-actions github-actions bot added area/docs-generation Generation of docs via Cobra size/M Denotes a PR that chanes 24-99 lines labels Apr 20, 2022
@orobardet orobardet force-pushed the add-COMMANDS-section-man-pages branch 2 times, most recently from 9a6f197 to 94cc3e9 Compare April 20, 2022 12:37
@orobardet
Copy link
Author

Hi @johnSchnake
Thanks for you curation work.

I just pushed an update rebased on the latest master, and using StringWriter. Which maintainer do I need to mention to have a look on this PR?

When a command has available sub-commands, the COMMANDS
man section is generated with the list of sub-commands, with
their name, short description, and the name of the dedicated
man page.
@orobardet orobardet force-pushed the add-COMMANDS-section-man-pages branch from 94cc3e9 to 98e8c71 Compare April 20, 2022 13:04
@umarcor
Copy link
Contributor

umarcor commented Apr 21, 2022

hoshsadiq pushed a commit to zulucmd/zulu that referenced this pull request Dec 31, 2022
When a command has available sub-commands, the COMMANDS
man section is generated with the list of sub-commands, with
their name, short description, and the name of the dedicated
man page.

Merge spf13/cobra#939

Fixes spf13/cobra#680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs-generation Generation of docs via Cobra size/M Denotes a PR that chanes 24-99 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

requesting option to add COMMANDS section to man pages via GenManTree
5 participants