gist 4.5.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/build/gist.1 DELETED
@@ -1,230 +0,0 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "GIST" "1" "November 2015" "" "Gist manual"
5
- .
6
- .SH "NAME"
7
- \fBgist\fR \- upload code to https://gist\.github\.com
8
- .
9
- .SH "Synopsis"
10
- The gist gem provides a \fBgist\fR command that you can use from your terminal to upload content to https://gist\.github\.com/\.
11
- .
12
- .SH "Installation"
13
- .
14
- .IP "\(bu" 4
15
- If you have ruby installed:
16
- .
17
- .IP
18
- gem install gist
19
- .
20
- .IP "\(bu" 4
21
- If you\'re using Bundler:
22
- .
23
- .IP
24
- source :rubygems gem \'gist\'
25
- .
26
- .IP "\(bu" 4
27
- For OS X, gist lives in Homebrew
28
- .
29
- .IP
30
- brew install gist
31
- .
32
- .IP "" 0
33
- .
34
- .SH "Command"
35
- .
36
- .IP "\(bu" 4
37
- To upload the contents of \fBa\.rb\fR just:
38
- .
39
- .IP
40
- gist a\.rb
41
- .
42
- .IP "\(bu" 4
43
- Upload multiple files:
44
- .
45
- .IP
46
- gist a b c gist *\.rb
47
- .
48
- .IP "\(bu" 4
49
- By default it reads from STDIN, and you can set a filename with \fB\-f\fR\.
50
- .
51
- .IP
52
- gist \-f test\.rb <a\.rb
53
- .
54
- .IP "\(bu" 4
55
- Alternatively, you can just paste from the clipboard:
56
- .
57
- .IP
58
- gist \-P
59
- .
60
- .IP "\(bu" 4
61
- Use \fB\-p\fR to make the gist private:
62
- .
63
- .IP
64
- gist \-p a\.rb
65
- .
66
- .IP "\(bu" 4
67
- Use \fB\-d\fR to add a description:
68
- .
69
- .IP
70
- gist \-d "Random rbx bug" a\.rb
71
- .
72
- .IP "\(bu" 4
73
- You can update existing gists with \fB\-u\fR:
74
- .
75
- .IP
76
- gist \-u GIST_ID FILE_NAME gist \-u 42f2c239d2eb57299408 test\.txt
77
- .
78
- .IP "\(bu" 4
79
- If you\'d like to copy the resulting URL to your clipboard, use \fB\-c\fR\.
80
- .
81
- .IP
82
- gist \-c <a\.rb
83
- .
84
- .IP "\(bu" 4
85
- If you\'d like to copy the resulting embeddable URL to your clipboard, use \fB\-e\fR\.
86
- .
87
- .IP
88
- gist \-e <a\.rb
89
- .
90
- .IP "\(bu" 4
91
- And you can just ask gist to open a browser window directly with \fB\-o\fR\.
92
- .
93
- .IP
94
- gist \-o <a\.rb
95
- .
96
- .IP "\(bu" 4
97
- To list (public gists or all gists for authed user) gists for user
98
- .
99
- .IP
100
- gist \-l : all gists for authed user gist \-l defunkt : list defunkt\'s public gists
101
- .
102
- .IP "\(bu" 4
103
- See \fBgist \-\-help\fR for more detail\.
104
- .
105
- .IP "" 0
106
- .
107
- .SH "Login"
108
- If you want to associate your gists with your GitHub account, you need to login with gist\. It doesn\'t store your username and password, it just uses them to get an OAuth2 token (with the "gist" permission)\.
109
- .
110
- .IP "" 4
111
- .
112
- .nf
113
-
114
- gist \-\-login
115
- Obtaining OAuth2 access_token from github\.
116
- GitHub username: ConradIrwin
117
- GitHub password:
118
- 2\-factor auth code:
119
- Success! https://github\.com/settings/applications
120
- .
121
- .fi
122
- .
123
- .IP "" 0
124
- .
125
- .P
126
- This token is stored in \fB~/\.gist\fR and used for all future gisting\. If you need to you can revoke it from https://github\.com/settings/applications, or just delete the file\. If you need to store tokens for both github\.com and a Github Enterprise instance you can save your Github Enterprise token in \fB~/\.gist\.github\.example\.com\fR where "github\.example\.com" is the URL for your Github Enterprise instance\.
127
- .
128
- .IP "\(bu" 4
129
- After you\'ve done this, you can still upload gists anonymously with \fB\-a\fR\.
130
- .
131
- .IP
132
- gist \-a a\.rb
133
- .
134
- .IP "" 0
135
- .
136
- .TP
137
- You can also use Gist as a library from inside your ruby code:
138
- .
139
- .IP
140
- Gist\.gist("Look\.at(:my => \'awesome\')\.code")
141
- .
142
- .P
143
- If you need more advanced features you can also pass:
144
- .
145
- .IP "\(bu" 4
146
- \fB:access_token\fR to authenticate using OAuth2 (default is `File\.read("~/\.gist"))\.
147
- .
148
- .IP "\(bu" 4
149
- \fB:filename\fR to change the syntax highlighting (default is \fBa\.rb\fR)\.
150
- .
151
- .IP "\(bu" 4
152
- \fB:public\fR if you want your gist to have a guessable url\.
153
- .
154
- .IP "\(bu" 4
155
- \fB:description\fR to add a description to your gist\.
156
- .
157
- .IP "\(bu" 4
158
- \fB:update\fR to update an existing gist (can be a URL or an id)\.
159
- .
160
- .IP "\(bu" 4
161
- \fB:anonymous\fR to submit an anonymous gist (default is false)\.
162
- .
163
- .IP "\(bu" 4
164
- \fB:copy\fR to copy the resulting URL to the clipboard (default is false)\.
165
- .
166
- .IP "\(bu" 4
167
- \fB:open\fR to open the resulting URL in a browser (default is false)\.
168
- .
169
- .IP "" 0
170
- .
171
- .P
172
- NOTE: The access_token must have the "gist" scope\.
173
- .
174
- .IP "\(bu" 4
175
- If you want to upload multiple files in the same gist, you can:
176
- .
177
- .IP
178
- Gist\.multi_gist("a\.rb" => "Foo\.bar", "a\.py" => "Foo\.bar")
179
- .
180
- .IP "\(bu" 4
181
- If you\'d rather use gist\'s builtin access_token, then you can force the user to obtain one by calling:
182
- .
183
- .IP
184
- Gist\.login!
185
- .
186
- .IP "\(bu" 4
187
- This will take them through the process of obtaining an OAuth2 token, and storing it in \fB~/\.gist\fR, where it can later be read by \fBGist\.gist\fR
188
- .
189
- .IP "" 0
190
- .
191
- .SH "GitHub enterprise"
192
- .
193
- .IP "\(bu" 4
194
- If you\'d like \fBgist\fR to use your locally installed GitHub Enterprise \fIhttps://enterprise\.github\.com/\fR, you need to export the \fBGITHUB_URL\fR environment variable in your \fB~/\.bashrc\fR\.
195
- .
196
- .IP
197
- export GITHUB_URL=http://github\.internal\.example\.com/
198
- .
199
- .IP "\(bu" 4
200
- Once you\'ve done this and restarted your terminal (or run \fBsource ~/\.bashrc\fR), gist will automatically use github enterprise instead of the public github\.com
201
- .
202
- .IP "" 0
203
- .
204
- .SH "Configuration"
205
- .
206
- .IP "\(bu" 4
207
- If you\'d like \fB\-o\fR or \fB\-c\fR to be the default when you use the gist executable, add an alias to your \fB~/\.bashrc\fR (or equivalent)\. For example:
208
- .
209
- .IP
210
- alias gist=\'gist \-c\'
211
- .
212
- .IP "\(bu" 4
213
- If you\'d prefer gist to open a different browser, then you can export the BROWSER environment variable:
214
- .
215
- .IP
216
- export BROWSER=google\-chrome
217
- .
218
- .IP "" 0
219
- .
220
- .P
221
- If clipboard or browser integration don\'t work on your platform, please file a bug or (more ideally) a pull request\.
222
- .
223
- .P
224
- If you need to use an HTTP proxy to access the internet, export the \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variable and gist will use it\.
225
- .
226
- .SH "Meta\-fu"
227
- Thanks to @defunkt and @indirect for writing and maintaining versions 1 through 3\. Thanks to @rking and @ConradIrwin for maintaining version 4\.
228
- .
229
- .P
230
- Licensed under the MIT license\. Bug\-reports, and pull requests are welcome\.