Skip to content

Commit 060b11a

Browse files
committed
Make doc updates (readme and manpages)
1 parent 6ad8223 commit 060b11a

File tree

2 files changed

+88
-22
lines changed

2 files changed

+88
-22
lines changed

ReadMe.pod

+45-10
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ completion.
7070

7171
The second method is to do these things by hand. This might afford you more
7272
control of your shell environment. Simply add the C<lib> and C<man>
73-
directories to your C<PATH and >MANPATH`:
73+
directories to your C<PATH> and C<MANPATH>:
7474

75-
export PATH=/path/to/git-hub/lib:"$PATH"
76-
export MANPATH=/path/to/git-hub/man:"$MANPATH"
75+
export PATH="/path/to/git-hub/lib:$PATH"
76+
export MANPATH="/path/to/git-hub/man:$MANPATH"
7777

7878
See below for info on how to turn on Command Completion.
7979

@@ -99,18 +99,53 @@ If you used C<make install> method, then:
9999

100100
=head1 Command Completion
101101

102-
The C<git hub> command supports C<< <TAB> >>-based command completion. You
103-
need to first turn on Git command completion with something like this:
102+
The C<git hub> command supports C<< <TAB> >>-based command completion. If you
103+
don’t use the C<init> script (see Installation, above), you’ll need to enable
104+
this manually to use it.
104105

105-
source /etc/bash_completion.d/git
106+
=head2 In Bash
106107

107-
Note: if you don't have this file or can't find it, do this:
108+
If your Bash setup does not already provide command completion for Git, you’ll
109+
need to enable that first:
108110

109-
source /path/to/git-hub/lib/git-hub.d/git-completion
111+
source <Git completion script>
110112

111-
Then turn on C<git-hub> completion with a command like this:
113+
On your system, the Git completion script might be found at any of the
114+
following locations (or somewhere else that we don’t know about):
112115

113-
source /path/to/git-hub/lib/git-hub.d/completion
116+
=over
117+
118+
=item * C</etc/bash_completion.d/git>
119+
120+
=item * C</usr/share/bash-completion/git>
121+
122+
=item * C</usr/share/bash-completion/completions/git>
123+
124+
=item * C</opt/local/share/bash-completion/completions/git>
125+
126+
=item * C</usr/local/etc/bash_completion.d/git>
127+
128+
=item * C<~/.homebrew/etc/bash_completion.d/git>
129+
130+
=back
131+
132+
In case you can’t find any of these, this repository contains a copy of the
133+
Git completion script:
134+
135+
source /path/to/git-hub/share/git-completion.bash
136+
137+
Once Git completion is enabled (whether you needed to do that manually or
138+
not), you can turn on C<git-hub> completion with a command like this:
139+
140+
source /path/to/git-hub/share/completion.bash
141+
142+
=head2 In zsh
143+
144+
In the Z shell (zsh), you can manually enable C<git-hub> completion by
145+
adding the following line to your C<~/.zshrc>, B<before> the C<compinit>
146+
function is called:
147+
148+
fpath=('/path/to/git-hub/share/zsh-completion' $fpath)
114149

115150
=head1 Plugins
116151

man/man1/git-hub.1

+43-12
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
.rr rF
7171
.\" ========================================================================
7272
.\"
73-
.IX Title "IO::FILE=IO(0X1DC0FE0) 1"
74-
.TH IO::FILE=IO(0X1DC0FE0) 1 "2014-08-28" "perl v5.18.1" "User Contributed Perl Documentation"
73+
.IX Title "IO::FILE=IO(0X18FA0F0) 1"
74+
.TH IO::FILE=IO(0X18FA0F0) 1 "2014-09-04" "perl v5.18.1" "User Contributed Perl Documentation"
7575
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
7676
.\" way too many mistakes in technical documents.
7777
.if n .ad l
@@ -139,11 +139,11 @@ completion.
139139
.PP
140140
The second method is to do these things by hand. This might afford you more
141141
control of your shell environment. Simply add the \f(CW\*(C`lib\*(C'\fR and \f(CW\*(C`man\*(C'\fR
142-
directories to your \f(CW\*(C`PATH and \*(C'\fRMANPATH`:
142+
directories to your \f(CW\*(C`PATH\*(C'\fR and \f(CW\*(C`MANPATH\*(C'\fR:
143143
.PP
144144
.Vb 2
145-
\& export PATH=/path/to/git\-hub/lib:"$PATH"
146-
\& export MANPATH=/path/to/git\-hub/man:"$MANPATH"
145+
\& export PATH="/path/to/git\-hub/lib:$PATH"
146+
\& export MANPATH="/path/to/git\-hub/man:$MANPATH"
147147
.Ve
148148
.PP
149149
See below for info on how to turn on Command Completion.
@@ -174,23 +174,54 @@ If you used \f(CW\*(C`make install\*(C'\fR method, then:
174174
.Ve
175175
.SH "Command Completion"
176176
.IX Header "Command Completion"
177-
The \f(CW\*(C`git hub\*(C'\fR command supports \f(CW\*(C`<TAB>\*(C'\fR\-based command completion. You
178-
need to first turn on Git command completion with something like this:
177+
The \f(CW\*(C`git hub\*(C'\fR command supports \f(CW\*(C`<TAB>\*(C'\fR\-based command completion. If you
178+
don’t use the \f(CW\*(C`init\*(C'\fR script (see Installation, above), you’ll need to enable
179+
this manually to use it.
180+
.SS "In Bash"
181+
.IX Subsection "In Bash"
182+
If your Bash setup does not already provide command completion for Git, you’ll
183+
need to enable that first:
179184
.PP
180185
.Vb 1
181-
\& source /etc/bash_completion.d/git
186+
\& source <Git completion script>
182187
.Ve
183188
.PP
184-
Note: if you don't have this file or can't find it, do this:
189+
On your system, the Git completion script might be found at any of the
190+
following locations (or somewhere else that we don’t know about):
191+
.IP "\(bu" 4
192+
\&\f(CW\*(C`/etc/bash_completion.d/git\*(C'\fR
193+
.IP "\(bu" 4
194+
\&\f(CW\*(C`/usr/share/bash\-completion/git\*(C'\fR
195+
.IP "\(bu" 4
196+
\&\f(CW\*(C`/usr/share/bash\-completion/completions/git\*(C'\fR
197+
.IP "\(bu" 4
198+
\&\f(CW\*(C`/opt/local/share/bash\-completion/completions/git\*(C'\fR
199+
.IP "\(bu" 4
200+
\&\f(CW\*(C`/usr/local/etc/bash_completion.d/git\*(C'\fR
201+
.IP "\(bu" 4
202+
\&\f(CW\*(C`~/.homebrew/etc/bash_completion.d/git\*(C'\fR
203+
.PP
204+
In case you can’t find any of these, this repository contains a copy of the
205+
Git completion script:
185206
.PP
186207
.Vb 1
187-
\& source /path/to/git\-hub/lib/git\-hub.d/git\-completion
208+
\& source /path/to/git\-hub/share/git\-completion.bash
188209
.Ve
189210
.PP
190-
Then turn on \f(CW\*(C`git\-hub\*(C'\fR completion with a command like this:
211+
Once Git completion is enabled (whether you needed to do that manually or
212+
not), you can turn on \f(CW\*(C`git\-hub\*(C'\fR completion with a command like this:
213+
.PP
214+
.Vb 1
215+
\& source /path/to/git\-hub/share/completion.bash
216+
.Ve
217+
.SS "In zsh"
218+
.IX Subsection "In zsh"
219+
In the Z shell (zsh), you can manually enable \f(CW\*(C`git\-hub\*(C'\fR completion by
220+
adding the following line to your \f(CW\*(C`~/.zshrc\*(C'\fR, \fBbefore\fR the \f(CW\*(C`compinit\*(C'\fR
221+
function is called:
191222
.PP
192223
.Vb 1
193-
\& source /path/to/git\-hub/lib/git\-hub.d/completion
224+
\& fpath=(\*(Aq/path/to/git\-hub/share/zsh\-completion\*(Aq $fpath)
194225
.Ve
195226
.SH "Plugins"
196227
.IX Header "Plugins"

0 commit comments

Comments
 (0)