-
-
Notifications
You must be signed in to change notification settings - Fork 330
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
cmd/shfmt: provide a manpage #574
Comments
That's unfortunate. I'm surprised that the tool's own help text is not enough:
Am I meant to maintain a separate document in manpage format? |
@mvdan I think that would be really great!
If you don't want to write pure nroff files, you could use reStructuredText, perlpod, Docbook or other markups that can be easily compiled to nroff. |
Thanks. I'll have to think about it. I assume the manpage should contain more than I can see why it's useful for users, but it's also a significant amount of extra work for me. The overlap between the three documents would mean that any future change would probably need to update all three documents with care. I wonder how other projects deal with this. |
I see several workflows in which you would avoid duplicating information. The advantage of reStructuredText is that it is supported by github, and thus you could just write individual manuals for each utility, referenced in the readme.rst, and add compilation to groff in your build logic. I personally have a workflow for my own utility where I convert groff to html with mandoc [1], deploy it to github pages and reference sections in my readme [2]. And a third workflow involving groff with mandoc consists in converting to markdown for a builtin rendering in github. There are a lot of options, but I reckon there is some hassle in the process of setting up all the glue code, and I wish there where a more generic, universal way to “write once, read everywhere” for utility documentation. [1] https://mandoc.bsd.lv/ |
you can use this manpage if you want |
@jsamr this took me a while to flesh out, but it's done. Please take a look and let me know if you spot any issues. I plan to release 3.2.0 in a day or two, so you could use that tag as the first version for Debian. Also, when it comes to packaging for Debian, please remember that many of the module dependencies in go.mod like |
v3.2.0 is released with the manpage. |
I am interested in packaging shfmt for Debian, but they require a manual page. See the Debian Policy Manual, chapter 12, section 1 (emphasis added):
The text was updated successfully, but these errors were encountered: