Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

210 lines (162 sloc) 7.613 kb
<!DOCTYPE html>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 ('>
<title>gist(1) - gist on the command line</title>
<style type='text/css' media='all'>
/* style: man */
body#manpage {margin:0}
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
.mp h2 {margin:10px 0 0 0}
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
.mp h3 {margin:0 0 0 4ex}
.mp dt {margin:0;clear:left}
.mp dt.flush {float:left;width:8ex}
.mp dd {margin:0 0 0 9ex}
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
.mp pre {margin-bottom:20px}
.mp pre+h2,.mp pre+h3 {margin-top:22px}
.mp h2+pre,.mp h3+pre {margin-top:5px}
.mp img {display:block;margin:auto}
.mp {display:none}
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
.mp h2 {font-size:16px;line-height:1.25}
.mp h1 {font-size:20px;line-height:2}
.mp {text-align:justify;background:#fff}
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
.mp u {text-decoration:underline}
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
.mp {font-weight:normal;color:#434241}
.mp pre {padding:0 4ex}
.mp pre code {font-weight:normal;color:#434241}
.mp h2+pre,h3+pre {padding-left:0}, li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px} {width:100%} {text-align:left} {text-align:center;letter-spacing:4px} {text-align:right;float:right}
The following styles are deprecated and will be removed at some point:
div#man, div#man, div#man ol.head, div#man
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
.man-navigation should be used instead.
<body id='manpage'>
<div class='mp' id='man'>
<div class='man-navigation' style='display:none'>
<a href="#NAME">NAME</a>
<a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#OPTIONS">OPTIONS</a>
<a href="#EXAMPLES">EXAMPLES</a>
<a href="#BUGS">BUGS</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#SEE-ALSO">SEE ALSO</a>
<ol class='man-decor man-head man head'>
<li class='tl'>gist(1)</li>
<li class='tc'>Gist Manual</li>
<li class='tr'>gist(1)</li>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>gist</code> - <span class="man-whatis">gist on the command line</span>
<p><code>gist</code> [<code>-p</code>] [<code>-t extension</code>] <var>FILE|-</var></p>
<p><code>gist</code> can be used to create gists on from the command
line. There are two primary methods of creating gists.</p>
<p>If standard input is supplied, it will be used as the content of the
new gist. If <var>FILE</var> is provided, the content of that file will be used
to create the gist. If <var>FILE</var> is '-' then gist will wait for content
from standard input.</p>
<p>Once your gist is successfully created, the URL will be copied to your
clipboard. If you are on OS X, <code>gist</code> will open the gist in your
browser, too.</p>
<h2 id="OPTIONS">OPTIONS</h2>
<p><code>gist</code>'s default mode of operation is to read content from standard
input and create a public, text gist without description from it, tied
to your GitHub account if you user and passwordare provided (see
<p>These options can be used to change this behavior:</p>
<dt><code>-p</code>, <code>--private</code></dt><dd><p>Create a private gist instead of a public gist.</p></dd>
<dt><code>-t</code>, <code>--type</code></dt><dd><p>Set the file extension explicitly. Passing a type of <code>rb</code> ensures
the gist is created as a Ruby file.</p></dd>
<dt><code>-d</code>, <code>--description</code></dt><dd><p>Set a description.</p></dd>
<dt><code>-o</code>, <code>--[no-]open</code></dt><dd><p>Open the gist in your browser after creation. Or don't. Defaults
to --open</p></dd>
<p>You may additionally ask for help:</p>
<dt><code>-h</code>, <code>--help</code></dt><dd><p>Print help.</p></dd>
<dt><code>-m</code>, <code>--man</code></dt><dd><p>Display this man page.</p></dd>
<p>There are two ways to set GitHub user and password info:</p>
<li><p>Using environment vars GITHUB_USER and GITHUB_PASSWORD</p>
<p>$ export GITHUB_USER=johndoe<br />
$ export GITHUB_PASSWORD=mysecretgithubpassword<br />
$ gist ~/example</p></li>
<li><p>Using <span class="man-ref">git-config<span class="s">(1)</span></span></p></li>
<p>Use <span class="man-ref">git-config<span class="s">(1)</span></span> to display the currently configured GitHub username:</p>
<pre><code>$ git config --global github.user
<p>Or, set the GitHub username with:</p>
<pre><code>$ git config --global github.user &lt;username>
<p>See <a href="" data-bare-link="true"></a> for more
<p>You can set a few options in your git config (using <span class="man-ref">git-config<span class="s">(1)</span></span>) to
control the default behavior of <a class="man-ref" href="gist.1.ron.html">gist<span class="s">(1)</span></a>.</p>
<li><p>gist.private - boolean (yes or no) - Determines whether to make a gist
private by default</p></li>
<li><p>gist.extension - string - Default extension for gists you create.</p></li>
<li><p>gist.browse - boolean (yes or no) - Whether to open the gist in your
browser after creation. Default: yes</p></li>
<p>The following environment variables affect the execution of <code>gist</code>:</p>
<li>HTTP_PROXY - Proxy to use when Gisting. Should be "http://host:port/"</li>
<pre><code>$ gist &lt; file.txt
$ echo secret | gist --private
$ echo "puts :hi" | gist -t rb
$ gist
$ gist -
the quick brown fox jumps over the lazy dog
<h2 id="BUGS">BUGS</h2>
<p><a href="" data-bare-link="true"></a></p>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Chris Wanstrath ::</p>
<h2 id="SEE-ALSO">SEE ALSO</h2>
<p><span class="man-ref">hub<span class="s">(1)</span></span>, <span class="man-ref">git<span class="s">(1)</span></span>, <span class="man-ref">git-clone<span class="s">(1)</span></span>,
<a href="" data-bare-link="true"></a>,
<a href="" data-bare-link="true"></a></p>
<ol class='man-decor man-foot man foot'>
<li class='tl'>GITHUB</li>
<li class='tc'>November 2012</li>
<li class='tr'>gist(1)</li>
Jump to Line
Something went wrong with that request. Please try again.