Skip to content

Commit

Permalink
Add hub help documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jan 25, 2016
1 parent 7e62ef8 commit f74b54a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ HELP_EXT = \
man/hub-cherry-pick.1 \
man/hub-clone.1 \
man/hub-fetch.1 \
man/hub-help.1 \
man/hub-init.1 \
man/hub-merge.1 \
man/hub-push.1 \
Expand Down
30 changes: 28 additions & 2 deletions commands/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,34 @@ import (
var cmdHelp = &Command{
Run: runHelp,
GitExtension: true,
Usage: "help [<COMMAND>]",
Long: `Show the help page for a command.`,
Usage: `
help hub
help <COMMAND>
help hub-<COMMAND> [--plain-text]
`,
Long: `Show the help page for a command.
## Options:
hub-<COMMAND>
Use this format to view help for hub extensions to an existing git command.
--plain-text
Skip man page lookup mechanism and display plain help text.
## Man lookup mechanism:
On systems that have 'man', help pages are looked up in these directories
relative to 'hub' install prefix:
* 'man/<command>.1'
* 'share/man/man1/<command>.1'
On systems without 'man', same help pages are looked up with a '.txt' suffix.
## See also:
hub(1), git-help(1)
`,
}

func init() {
Expand Down

0 comments on commit f74b54a

Please sign in to comment.