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

feat: add support for examples #13

Merged
merged 1 commit into from
Sep 8, 2022
Merged

feat: add support for examples #13

merged 1 commit into from
Sep 8, 2022

Conversation

jon4hz
Copy link
Contributor

@jon4hz jon4hz commented Aug 30, 2022

Some libraries like cobra allow you to set examples for commands.
This PR extends the mango.Command with an example which will be added to the man page automatically.

The placement of the examples is roughly according to https://linux.die.net/man/7/man-pages

An example implementation for a mango adapter can be found here: muesli/mango-cobra@main...jon4hz:mango-cobra:main

@muesli muesli added the enhancement New feature or request label Aug 30, 2022
@muesli muesli merged commit 5040723 into muesli:main Sep 8, 2022
@muesli
Copy link
Owner

muesli commented Sep 8, 2022

Thank you, @jon4hz!

@jon4hz
Copy link
Contributor Author

jon4hz commented Sep 11, 2022

My pleasure! Will add a PR for mango-cobra and mango-coral when the next release is out :)

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

Successfully merging this pull request may close these issues.

2 participants