forked from APACGAMONDE/Gift-Card-Trade-in
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgh-completion.1
99 lines (69 loc) · 1.51 KB
/
gh-completion.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.nh
.TH "gh" "1" "Jun 2021" "" ""
.SH NAME
.PP
gh\-completion \- Generate shell completion scripts
.SH SYNOPSIS
.PP
\fBgh completion \-s \fP
.SH DESCRIPTION
.PP
Generate shell completion scripts for GitHub CLI commands.
.PP
When installing GitHub CLI through a package manager, it's possible that
no additional shell configuration is necessary to gain completion support. For
Homebrew, see https://docs.brew.sh/Shell\-Completion
\[la]https://docs.brew.sh/Shell-Completion\[ra]
.PP
If you need to set up completions manually, follow the instructions below. The exact
config file locations might vary based on your system. Make sure to restart your
shell before testing whether completions are working.
.SS bash
.PP
Add this to your \fB\fC\~/.bash\_profile\fR:
.PP
.RS
.nf
eval "$(gh completion \-s bash)"
.fi
.RE
.SS zsh
.PP
Generate a \fB\fC\_gh\fR completion script and put it somewhere in your \fB\fC$fpath\fR:
.PP
.RS
.nf
gh completion \-s zsh > /usr/local/share/zsh/site\-functions/\_gh
.fi
.RE
.PP
Ensure that the following is present in your \fB\fC\~/.zshrc\fR:
.PP
.RS
.nf
autoload \-U compinit
compinit \-i
.fi
.RE
.PP
Zsh version 5.7 or later is recommended.
.SS fish
.PP
Generate a \fB\fCgh.fish\fR completion script:
.PP
.RS
.nf
gh completion \-s fish > \~/.config/fish/completions/gh.fish
.fi
.RE
.SH OPTIONS
.PP
\fB\-s\fP, \fB\-\-shell\fP=""
Shell type: {bash|zsh|fish|powershell}
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-help\fP[=false]
Show help for command
.SH SEE ALSO
.PP
\fBgh(1)\fP