man icon indicating copy to clipboard operation
man copied to clipboard

Design: how should we display subcommands?

Open yoshuawuyts opened this issue 7 years ago • 1 comments

I'm not sure how we should be handling subcommands. Should we create separate man pages? Should we create a single man page? It'd be super useful to gather prior art so we can figure out some of the options we have!

Ideally we could find a default that works for most people, and start by implementing that.

Let's start by looking at how git(1) does it.

Example: Git

Git create separate man pages for its subcommands. The git man page has GIT COMMANDS and HIGH LEVEL COMMANDS sections listing these commands.

Each subcommand has its own page, like you'd expect from any other man page.

Screenshots

git(1) commands section

2018-07-19-202102_1920x1080

git-add(1) man page

2018-07-19-202457_1920x1080

yoshuawuyts avatar Jul 19 '18 18:07 yoshuawuyts

Right now I'm thinking separate man pages is the right way to go. It's the way cargo does it too, so there's at least some established prior art!

yoshuawuyts avatar Jul 23 '18 10:07 yoshuawuyts