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 doc and shell completion generation commands #63

Closed
wants to merge 1 commit into from

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Dec 16, 2023

Use 'doc' to generate manpages, and 'completion' to generate shell completion scripts.

This changes to IMGREF in the usage string because manpage won't output

@ondrejbudai
Copy link
Member

ondrejbudai commented Dec 18, 2023

Thanks! Not sure if you know this, but we intend to ship this only as a container image, so having a man page might be a challenge, since containers generally lack the man tooling.

This makes me wonder how to properly do man pages (or offline documentation shipped with the tool itself in general) for a container: One of my ideas was to bundle README.md inside the image and teach the container to show it using a pager (like less(1)). Basically run podman run bootc-image-builder man and it would give you a paginated README.md. Alternatively, we can tie this somehow to what cobra generates.

I'm happy to hear your thoughts.

Use 'doc' to generate manpages, and 'completion' to generate shell
completion scripts.

This changes <imgref> to IMGREF in the usage string because manpage
won't output <imgref>
@bcl
Copy link
Contributor Author

bcl commented Dec 20, 2023

It might be useful to have them available even without man so that people exploring using (or extending) the container can generate the manpages and read them with cat :) Automated doc generation is always better than trying to keep a readme in sync.

@bcl bcl closed this Jan 19, 2024
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.

2 participants