Skip to content
Browse files

Added documentation for --copy-js

  • Loading branch information...
1 parent 9a08978 commit 1b7afaa15fb43ba7a7463cf84b243a9901d5f40c @zph zph committed Feb 23, 2013
Showing with 11 additions and 4 deletions.
  1. +6 −0 README.md
  2. +5 −4 bin/jist
View
6 README.md
@@ -68,6 +68,12 @@ $ jist -c <a.rb
https://gist.github.com/7db51bb5f4f35c480fc8
```
+If you'd like to copy the resulting embeddable URL to your clipboard, use `--copy-js`.
+
+```shell
+$ jist --copy-js <a.rb
+<script src="https://gist.github.com/7db51bb5f4f35c480fc8"></script>
+```
And you can just ask jist to open a browser window directly with `-o`.
```shell
View
9 bin/jist
@@ -33,14 +33,15 @@ If you would like to shorten the resulting gist URL, use the -s flag. This will
use GitHub's URL shortener, git.io.
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. You can add `alias jist='jist -c'` to
-your shell's rc file to configure this behaviour by default.
+open it directly in your browser, use -o. Using the -j 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
+behaviour by default.
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
original gist with the same GitHub account.
-Usage: #{executable_name} [-o|-c] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
+Usage: #{executable_name} [-o|-c|-j] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
#{executable_name} --login
EOS
@@ -82,7 +83,7 @@ Usage: #{executable_name} [-o|-c] [-p] [-s] [-d DESC] [-t TOKEN|-a] [-u URL] [-P
opts.on("-c", "--copy", "Copy the resulting URL to the clipboard") do
options[:copy] = true
end
- opts.on("--copy-js", "Copy the resulting URL to the clipboard") do
+ opts.on("-j", "--copy-js", "Copy the resulting embeddable URL to the clipboard") do
options[:copy_js] = true
end

0 comments on commit 1b7afaa

Please sign in to comment.
Something went wrong with that request. Please try again.