Skip to content

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