App-git-hub

 view release on metacpan or  search on metacpan

share/man/man1/git-hub.1  view on Meta::CPAN

.PP
.Vb 1
\&    make install        # Possibly with \*(Aqsudo\*(Aq
.Ve
.SH "Command Completion"
.IX Header "Command Completion"
The \f(CW\*(C`git hub\*(C'\fR command supports \f(CW\*(C`<TAB>\*(C'\fR\-based command completion. If you don't use the \f(CW\*(C`init\*(C'\fR script (see Installation, above), you'll need to enable this manually to use it.
.SS "In Bash"
.IX Subsection "In Bash"
If your Bash setup does not already provide command completion for Git, you'll need to enable that first:
.PP
.Vb 1
\&    source <Git completion script>
.Ve
.PP
On your system, the Git completion script might be found at any of the following locations (or somewhere else that we don't know about):
.IP "\(bu" 4
\&\f(CW\*(C`/etc/bash_completion.d/git\*(C'\fR
.IP "\(bu" 4
\&\f(CW\*(C`/usr/share/bash\-completion/git\*(C'\fR
.IP "\(bu" 4
\&\f(CW\*(C`/usr/share/bash\-completion/completions/git\*(C'\fR
.IP "\(bu" 4
\&\f(CW\*(C`/opt/local/share/bash\-completion/completions/git\*(C'\fR
.IP "\(bu" 4
\&\f(CW\*(C`/usr/local/etc/bash_completion.d/git\*(C'\fR
.IP "\(bu" 4
\&\f(CW\*(C`~/.homebrew/etc/bash_completion.d/git\*(C'\fR
.PP
In case you can't find any of these, this repository contains a copy of the Git completion script:
.PP
.Vb 1
\&    source /path/to/git\-hub/share/git\-completion.bash
.Ve
.PP
Once Git completion is enabled (whether you needed to do that manually or not), you can turn on \f(CW\*(C`git\-hub\*(C'\fR completion with a command like this:
.PP
.Vb 1
\&    source /path/to/git\-hub/share/completion.bash
.Ve
.SS "In zsh"
.IX Subsection "In zsh"
In the Z shell (zsh), you can manually enable \f(CW\*(C`git\-hub\*(C'\fR completion by adding the following line to your \f(CW\*(C`~/.zshrc\*(C'\fR, \fBbefore\fR the \f(CW\*(C`compinit\*(C'\fR function is called:
.PP
.Vb 1
\&    fpath=(\*(Aq/path/to/git\-hub/share/zsh\-completion\*(Aq $fpath)
.Ve
.SH "Plugins"
.IX Header "Plugins"
The \f(CW\*(C`git\-hub\*(C'\fR command supports plugins. All you need to do to install a plugin, is to clone the plugin repo into the \f(CW\*(C`plugin/\*(C'\fR subdirectory of the \f(CW\*(C`git\-hub\*(C'\fR repository. There are example plugins alrea...
.SH "Faster"
.IX Header "Faster"
The \f(CW\*(C`git\-hub\*(C'\fR command is written in pure Bash, including a complete \s-1JSON\s0 parser written in Bash. Unfortunately, this parser is a bit slow. It is \fBreally\fR slow for large \s-1API\s0 payloads.
.PP
To make the \f(CW\*(C`git\-hub\*(C'\fR command perform much faster, just run this command:
.PP
.Vb 1
\&    git hub config json\-lib json\-perl.bash
.Ve
.PP
That will enable a Perl replacement, which requires Perl (of course) and the \s-1JSON\s0.pm Perl module. If the \s-1JSON::XS\s0 Perl module is also installed, it will be even faster.
.SH "Pipe and Each"
.IX Header "Pipe and Each"
You can pipe the output of one \f(CW\*(C`git hub\*(C'\fR into another and multiply your power. The command being piped into should use the \s-1EACH\s0 option which is a single dash ('\-'). It will cause the command to be run once for each line of inp...
.PP
This command:
.PP
.Vb 1
\&    git hub followers \-\-raw
.Ve
.PP
will list lines containing only user ids. You can pipe it into commands needing a user id, like:
.PP
.Vb 1
\&    git hub followers \-\-raw | git hub user \- \-\-json
.Ve
.PP
Thus printing the \s-1JSON\s0 user info for each follower. Same as:
.PP
.Vb 3
\&    for _ in \`git hub followers \-\-raw\`; do
\&      git hub user $_ \-\-json
\&    done
.Ve
.PP
For '=' you can do things like:
.PP
.Vb 1
\&    echo alice bob chelsea | git hub trust =
.Ve
.PP
to trust a list of users in one go.
.SH "Token Authentication and Scopes"
.IX Header "Token Authentication and Scopes"
Many endpoints of the GitHub v3 \s-1API\s0 require a Personal \s-1API\s0 Access Token. You can list your current tokens with this command:
.PP
.Vb 1
\&    git hub tokens
.Ve
.PP
If you don't have any tokens or want a new one for the \f(CW\*(C`git\-hub\*(C'\fR command, run these commands (the \f(CW\*(C`git hub setup\*(C'\fR command automates this):
.PP
.Vb 4
\&    git hub token\-new "my git\-hub command token"
\&    git hub scope\-add <token\-id> user repo
\&    git hub scopes <token\-id>
\&    git hub config api\-token <token\-value>
.Ve
.PP
You can also see all your tokens on the web at this page <https://github.com/settings/applications>.
.PP
You can specify your \s-1API\s0 token to \f(CW\*(C`git hub\*(C'\fR on the commandline with \f(CW\*(C`\-\-token=...\*(C'\fR or in the \f(CW\*(C`GIT_HUB_API_TOKEN\*(C'\fR environment variable, but the easiest thing to do is just set it in the git-hub c...
.PP
Certain token \fBscopes\fR are required for various GitHub \s-1API\s0 operations. Make sure your token has the scopes turned on for the things you want to do. See the \f(CW\*(C`scopes\*(C'\fR, \f(CW\*(C`scope\-add\*(C'\fR and \f(CW\*(C`scope\-remove\...
.PP
\&\s-1NOTE:\s0 All the \f(CW\*(C`git hub\*(C'\fR commands dealing with tokens and scopes require you to enter your GitHub password. If you need to issue a bunch of these commands and you don't want to retype your password each time, you can put your ...
.SH "Rate Limits"
.IX Header "Rate Limits"
GitHub limits unauthenticated \s-1API\s0 calls to 60 per hour, and authenticated \s-1API\s0 calls to 5000 per hour. For this reason you may wish to use authentication even for calls that don't need it. You can use the \f(CW\*(C`\-A/\-\-use\-auth\*(C'...
.PP
.Vb 1



( run in 3.934 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )