Skip to content

Move the command description to a markdown file for man pages#26830

Merged
thaJeztah merged 1 commit intomoby:masterfrom
dnephin:man-desc-in-files
Jan 3, 2017
Merged

Move the command description to a markdown file for man pages#26830
thaJeztah merged 1 commit intomoby:masterfrom
dnephin:man-desc-in-files

Conversation

@dnephin
Copy link
Member

@dnephin dnephin commented Sep 22, 2016

Following up on some concerns from #23825 and #25615.

This changes moves the command "long description" back to a markdown file, so that we can use "`" and so that docs contributors don't have to edit source files.

It still uses the cobra man page generation for the flags and the rest of the structure, but reads the long description from a file.

I've ported over the volume commands, which were using the in-lined description, as well as all the network commands, and a couple random top-level commands. If this looks good I can proceed with the rest as part of #26721

@dnephin
Copy link
Member Author

dnephin commented Sep 22, 2016

cc @thaJeztah @vdemeester

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if these "history" lines have any official meaning in man files; iow is it OK to omit them? (just curious)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is just a header/section like any other. I took a lot at man git, and man top, and neither of them have history sections (at least on arch).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, thanks! I won't miss them (and they are really outdated), so good to get rid of them I think

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit while I'm browsing; should be no space before $

@thaJeztah
Copy link
Member

I really like this! Wondering if we need the nested directories for sub commands (volumes/ls), and possibly name it partials or so (instead of src), but that's just bike shedding, no big issue.

We could even expand on this in future to re-use this for the reference docs

design LGTM, I'm moving this to code review, but /cc @vdemeester as well

@dnephin
Copy link
Member Author

dnephin commented Oct 17, 2016

Wondering if we need the nested directories for sub commands

We could use underscore separators instead of directories, but I prefer directories.

possibly name it partials or so (instead of src)

partials to me implies that you could mix them together. It's true that they aren't the complete source. I like src, but if we want to change it, something like descriptions might be more appropriate than partials.

We could even expand on this in future to re-use this for the reference docs

Absolutely. I'm going to start setting that up now as part of #26784 I think

@thaJeztah
Copy link
Member

Thanks! Yeah, the naming is just bike-shedding, and no strong preference on my side, so 👍

@dnephin dnephin force-pushed the man-desc-in-files branch 2 times, most recently from 631b633 to 50ec08c Compare October 20, 2016 22:45
@thaJeztah
Copy link
Member

ping @vdemeester PTAL

@dnephin dnephin force-pushed the man-desc-in-files branch 2 times, most recently from 6d9764c to 667e1e3 Compare November 4, 2016 18:11
@dnephin
Copy link
Member Author

dnephin commented Nov 4, 2016

ping, rebased again

@thaJeztah
Copy link
Member

hmf needs another rebase already

ping @vdemeester, ptal !

@FrenchBen
Copy link
Contributor

ping @vdemeester for review - @dnephin this needs another rebase it seems :\

@thaJeztah
Copy link
Member

@dnephin could you rebase?

@dnephin
Copy link
Member Author

dnephin commented Dec 27, 2016

I've been rebasing this almost every week for a few months. I can do it again, but it seems kind of pointless unless we're ready to merge this sometime soon.

@dnephin
Copy link
Member Author

dnephin commented Dec 27, 2016

rebased again

@vdemeester vdemeester self-assigned this Dec 27, 2016
@FrenchBen
Copy link
Contributor

Can we please get this merged asap?

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐸
@dnephin could you squash your commit though 👼 (actual commit message are pretty much the same for all commits 😓)

@dnephin
Copy link
Member Author

dnephin commented Jan 3, 2017

Squashed, and build is green

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit e4223e3 into moby:master Jan 3, 2017
@GordonTheTurtle GordonTheTurtle added this to the 1.14.0 milestone Jan 3, 2017
@dnephin dnephin deleted the man-desc-in-files branch January 4, 2017 15:11
dnephin pushed a commit to dnephin/docker that referenced this pull request Apr 17, 2017
Move the command description to a markdown file for man pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants