-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Split help into individual man pages #1087
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9018bd7
to
b149800
Compare
- No more `c.Short` property. Instead, the first line of `c.Long` property is considered a short command description. - The `c.Usage` text can now contain multiple lines. - The new `c.Synopsis()` method renders usage synopsis for humans: Usage: hub my-command --arg hub my-command --alternative-arg - The new `c.HelpText()` method renders synopsis + full help text.
b149800
to
3adf1f5
Compare
For compatibility with git, `hub help checkout` will display the help for git-checkout and there will be no information about hub extensions to this command. Now with `hub help hub-checkout`, hub will print the help text from hub's extension to git-checkout.
Instead of displaying plain text help, `hub help <command>` will now search for man pages to display. * If `man` is available, hub first tries to locate the local `../man/hub-<command>.1` file relative to the `hub` executable. If found, open it with `man`. If not, execute `man 1 hub-<command>`. * Otherwise, resort to displaying plain text help.
This mimics `git` behavior.
In the future, individual man pages will be generated prior to release.
Man pages should be the canonical source of hub documentation. People should use `man help hub` instead of viewing the README, which might not even correspond to the version they have installed. This ends the confusing man page build system in which parts of the README are injected into `hub.1.ronn` source file, deletes the Rakefile and removes rake from gem bundle. The examples are deleted because they are now inlined with individual command documentation. So did the documentation for all hub commands get deleted from main man page in favor of individual man pages. However, this makes main man page have absolutely no listing of which commands are available. This will get addressed as we go forward.
3adf1f5
to
9ef8efc
Compare
mislav
added a commit
that referenced
this pull request
Jan 25, 2016
Split help into individual man pages
38 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The canonical version of documentation for each command is now maintained inside the
*.go
implementation file for that command. Duplicate documentation is removed from README and the mainhub(1)
man page.Add
make man-pages
that generates individual man pages for each command. Generated pages are not kept in version control; instead, they will be bundled with each release.hub help pull-request
will now showhub-pull-request(1)
man page on systems that supportman
. On Windows, plain text help will be displayed.hub help hub-clone
(note thehub-
prefix) now looks uphub-clone(1)
man page. As before,hub help clone
displays ordinarygit-clone(1)
documentation for compatibility with git.The HTML representation of man pages now has cross-reference links: