Skip to content

Commit

Permalink
List hub commands in main man page
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Jan 24, 2016
1 parent 4caffb6 commit 29a83e6
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 3 deletions.
71 changes: 68 additions & 3 deletions man/hub.1.ronn
Original file line number Diff line number Diff line change
@@ -1,12 +1,78 @@
hub(1) -- git + hub = github
============================
hub(1) -- make git easier with GitHub
=====================================

## SYNOPSIS

`hub` [`--noop`] <COMMAND> [<OPTIONS>]
`hub alias` [`-s`] [<SHELL>]
`hub help` hub-<COMMAND>

## DESCRIPTION

Hub is a tool that wraps git in order to extend it with extra functionality that
makes it better when working with GitHub.

## COMMANDS

Available commands are split into two groups: those that are already present in
git but that are extended through hub, and custom ones that hub provides.

### Extended git commands
* hub-am(1):
Replicate commits from a GitHub pull request locally.

* hub-apply(1):
Download a patch from GitHub and apply it locally.

* hub-checkout(1):
Check out the head of a pull request as a local branch.

* hub-cherry-pick(1):
Cherry-pick a commit from a fork on GitHub.

* hub-clone(1):
Clone a repository from GitHub.

* hub-fetch(1):
Add missing remotes prior to performing git fetch.

* hub-init(1):
Initialize a git repository and create it on GitHub.

* hub-merge(1):
Merge a pull request with a message like the GitHub Merge Button.

* hub-push(1):
Push a git branch to each of the listed remotes.

* hub-remote(1):
Add a git remote for a GitHub repository.

* hub-submodule(1):
Add a git submodule for a GitHub repository.

### New commands provided by hub
* hub-alias(1):
Show shell instructions for wrapping git.

* hub-browse(1):
Open a GitHub repository in a web browser.

* hub-ci-status(1):
Display GitHub Status information for a commit.

* hub-compare(1):
Open a GitHub compare page in a web browser.

* hub-create(1):
Create a new repository on GitHub and add a git remote for it.

* hub-fork(1):
Fork the current project on GitHub and add a git remote for it.

* hub-pull-request(1):
Create a GitHub pull request.

## CONFIGURATION

### GitHub OAuth authentication
Expand Down Expand Up @@ -54,5 +120,4 @@ this can be affected with the `GITHUB_HOST` environment variable:
## SEE ALSO

git(1), git-clone(1), git-remote(1), git-init(1),
<http://github.com>,
<https://github.com/github/hub>
11 changes: 11 additions & 0 deletions script/man
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,20 @@ generate() {
bin/ronn --roff --organization=GITHUB --manual="Hub Manual" "$ronn" >/dev/null
}

man_desc() {
echo " * hub-${1}(1):"
echo " $(hub_help "$1" | para == 2 | format_shortdesc)"
}

script/build

case "$1" in
--desc )
for cmd in $extensions $commands; do
man_desc "$cmd"
echo
done
;;
* )
for cmd in ${1:-$commands $extensions}; do
generate "$cmd"
Expand Down

0 comments on commit 29a83e6

Please sign in to comment.