Skip to content

Commit 23d825a

Browse files
committed
Rename --copy-js to --embed [Issue ConradIrwin#31]
For compatibility with defunkt/gist
1 parent 4a98996 commit 23d825a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bin/jist

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ If you would like to shorten the resulting gist URL, use the -s flag. This will
3232
use GitHub's URL shortener, git.io.
3333
3434
To copy the resulting URL to your clipboard you can use the -c option, or to just
35-
open it directly in your browser, use -o. Using the -j option will copy the embeddable
35+
open it directly in your browser, use -o. Using the -e option will copy the embeddable
3636
URL to the clipboard. You can add `alias jist='jist -c'` to your shell's rc file to configure this
3737
behaviour by default.
3838
3939
Instead of creating a new jist, you can update an existing one by passing its ID
4040
or URL with "-u". For this to work, you must be logged in, and have created the
4141
original gist with the same GitHub account.
4242
43-
Usage: #{executable_name} [-o|-c|-j] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
43+
Usage: #{executable_name} [-o|-c|-e] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
4444
#{executable_name} --login
4545
4646
EOS
@@ -82,8 +82,8 @@ Usage: #{executable_name} [-o|-c|-j] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL]
8282
opts.on("-c", "--copy", "Copy the resulting URL to the clipboard") do
8383
options[:copy] = true
8484
end
85-
opts.on("-j", "--copy-js", "Copy the embed code for the gist to the clipboard") do
86-
options[:copy_js] = true
85+
opts.on("-e", "--embed", "Copy the embed code for the gist to the clipboard") do
86+
options[:embed] = true
8787
options[:copy] = true
8888
end
8989

@@ -109,9 +109,9 @@ end
109109
opts.parse!
110110

111111
begin
112-
options[:output] = if options[:copy_js] && options[:shorten]
113-
raise Jist::Error, "--copy-js does not make sense with --shorten"
114-
elsif options[:copy_js]
112+
options[:output] = if options[:embed] && options[:shorten]
113+
raise Jist::Error, "--embed does not make sense with --shorten"
114+
elsif options[:embed]
115115
:javascript
116116
elsif options[:shorten]
117117
:short_url

0 commit comments

Comments
 (0)