@@ -8,84 +8,82 @@ upload content to https://gist.github.com/.
8
8
9
9
## Installation
10
10
11
- If you have ruby installed:
11
+ * If you have ruby installed:
12
12
13
13
gem install gist
14
14
15
- If you're using Bundler:
15
+ * If you're using Bundler:
16
16
17
17
source : rubygems
18
18
gem 'gist'
19
19
20
- For OS X, gist lives in Homebrew
20
+ * For OS X, ` gist ` lives in Homebrew
21
21
22
22
brew install gist
23
23
24
- For FreeBSD, gist lives in ports
24
+ * For FreeBSD, ` gist ` lives in ports
25
25
26
26
pkg install gist
27
27
28
- For Ubuntu/Debian
28
+ * For Ubuntu/Debian, ` gist ` has been renamed to ` gist-paste ` to avoid a name conflict
29
29
30
30
apt install gist
31
31
32
- Note: Debian renames the binary to ` gist-paste ` to avoid a name conflict.
33
-
34
32
## Command
35
33
36
- To upload the contents of ` a.rb ` just:
34
+ * To upload the contents of ` a.rb ` just:
37
35
38
36
gist a.rb
39
37
40
- Upload multiple files:
38
+ * Upload multiple files:
41
39
42
40
gist a b c
43
41
gist * .rb
44
42
45
- By default it reads from STDIN, and you can set a filename with ` -f ` .
43
+ * By default it reads from STDIN, and you can set a filename with ` -f ` .
46
44
47
45
gist -f test.rb <a.rb
48
46
49
- Alternatively, you can just paste from the clipboard:
47
+ * Alternatively, you can just paste from the clipboard:
50
48
51
49
gist -P
52
50
53
- Use ` -p ` to make the gist private:
51
+ * Use ` -p ` to make the gist private:
54
52
55
53
gist -p a.rb
56
54
57
- Use ` -d ` to add a description:
55
+ * Use ` -d ` to add a description:
58
56
59
57
gist -d "Random rbx bug" a.rb
60
58
61
- You can update existing gists with ` -u ` :
59
+ * You can update existing gists with ` -u ` :
62
60
63
61
gist -u GIST_ID FILE_NAME
64
62
gist -u 42f2c239d2eb57299408 test.txt
65
63
66
- If you'd like to copy the resulting URL to your clipboard, use ` -c ` .
64
+ * If you'd like to copy the resulting URL to your clipboard, use ` -c ` .
67
65
68
66
gist -c <a.rb
69
67
70
- If you'd like to copy the resulting embeddable URL to your clipboard, use ` -e ` .
68
+ * If you'd like to copy the resulting embeddable URL to your clipboard, use ` -e ` .
71
69
72
70
gist -e <a.rb
73
71
74
- And you can just ask gist to open a browser window directly with ` -o ` .
72
+ * And you can just ask gist to open a browser window directly with ` -o ` .
75
73
76
74
gist -o <a.rb
77
75
78
- To list (public gists or all gists for authed user) gists for user
76
+ * To list (public gists or all gists for authed user) gists for user
79
77
80
78
gist -l : all gists for authed user
81
79
gist -l defunkt : list defunkt's public gists
82
80
83
- To read a gist and print it to STDOUT
81
+ * To read a gist and print it to STDOUT
84
82
85
83
gist -r GIST_ID
86
84
gist -r 374130
87
85
88
- See ` gist --help ` for more detail.
86
+ * See ` gist --help ` for more detail.
89
87
90
88
## Login
91
89
@@ -119,7 +117,7 @@ This flow asks for your GitHub username and password (and 2FA code), and exchang
119
117
120
118
This token is stored in ` ~/.gist ` and used for all future gisting. If you need to
121
119
you can revoke it from https://github.com/settings/tokens , or just delete the
122
- file.
120
+ file.
123
121
124
122
#### Password-less login
125
123
@@ -165,7 +163,7 @@ Error: Bad credentials
165
163
166
164
# Library
167
165
168
- You can also use Gist as a library from inside your ruby code:
166
+ * You can also use Gist as a library from inside your ruby code:
169
167
170
168
Gist.gist("Look.at(: my => 'awesome').code")
171
169
@@ -181,11 +179,11 @@ If you need more advanced features you can also pass:
181
179
182
180
NOTE: The access_token must have the ` gist ` scope and may also require the ` user:email ` scope.
183
181
184
- If you want to upload multiple files in the same gist, you can:
182
+ * If you want to upload multiple files in the same gist, you can:
185
183
186
184
Gist.multi_gist("a.rb" => "Foo.bar", "a.py" => "Foo.bar")
187
185
188
- If you'd rather use gist's builtin access_token, then you can force the user
186
+ * If you'd rather use gist's builtin access_token, then you can force the user
189
187
to obtain one by calling:
190
188
191
189
Gist.login!
@@ -195,12 +193,12 @@ in `~/.gist`, where it can later be read by `Gist.gist`
195
193
196
194
## Configuration
197
195
198
- If you'd like ` -o ` or ` -c ` to be the default when you use the gist executable, add an
196
+ * If you'd like ` -o ` or ` -c ` to be the default when you use the gist executable, add an
199
197
alias to your ` ~/.bashrc ` (or equivalent). For example:
200
198
201
199
alias gist='gist -c'
202
200
203
- If you'd prefer gist to open a different browser, then you can export the BROWSER
201
+ * If you'd prefer gist to open a different browser, then you can export the BROWSER
204
202
environment variable:
205
203
206
204
export BROWSER=google-chrome
0 commit comments