Skip to content

Commit

Permalink
Rename --copy-js to --embed [Issue #31]
Browse files Browse the repository at this point in the history
For compatibility with defunkt/gist
  • Loading branch information
ConradIrwin committed Mar 22, 2013
1 parent 4a98996 commit 23d825a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bin/jist
Expand Up @@ -32,15 +32,15 @@ If you would like to shorten the resulting gist URL, use the -s flag. This will
use GitHub's URL shortener, git.io. use GitHub's URL shortener, git.io.
To copy the resulting URL to your clipboard you can use the -c option, or to just To copy the resulting URL to your clipboard you can use the -c option, or to just
open it directly in your browser, use -o. Using the -j option will copy the embeddable open it directly in your browser, use -o. Using the -e option will copy the embeddable
URL to the clipboard. You can add `alias jist='jist -c'` to your shell's rc file to configure this URL to the clipboard. You can add `alias jist='jist -c'` to your shell's rc file to configure this
behaviour by default. behaviour by default.
Instead of creating a new jist, you can update an existing one by passing its ID Instead of creating a new jist, you can update an existing one by passing its ID
or URL with "-u". For this to work, you must be logged in, and have created the or URL with "-u". For this to work, you must be logged in, and have created the
original gist with the same GitHub account. original gist with the same GitHub account.
Usage: #{executable_name} [-o|-c|-j] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE* Usage: #{executable_name} [-o|-c|-e] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
#{executable_name} --login #{executable_name} --login
EOS EOS
Expand Down Expand Up @@ -82,8 +82,8 @@ Usage: #{executable_name} [-o|-c|-j] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL]
opts.on("-c", "--copy", "Copy the resulting URL to the clipboard") do opts.on("-c", "--copy", "Copy the resulting URL to the clipboard") do
options[:copy] = true options[:copy] = true
end end
opts.on("-j", "--copy-js", "Copy the embed code for the gist to the clipboard") do opts.on("-e", "--embed", "Copy the embed code for the gist to the clipboard") do
options[:copy_js] = true options[:embed] = true
options[:copy] = true options[:copy] = true
end end


Expand All @@ -109,9 +109,9 @@ end
opts.parse! opts.parse!


begin begin
options[:output] = if options[:copy_js] && options[:shorten] options[:output] = if options[:embed] && options[:shorten]
raise Jist::Error, "--copy-js does not make sense with --shorten" raise Jist::Error, "--embed does not make sense with --shorten"
elsif options[:copy_js] elsif options[:embed]
:javascript :javascript
elsif options[:shorten] elsif options[:shorten]
:short_url :short_url
Expand Down

0 comments on commit 23d825a

Please sign in to comment.