Skip to content

HTTPS clone URL

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>
<html>
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.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 h1.man-title {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 b.man-ref {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}
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
ol.man-decor {width:100%}
ol.man-decor li.tl {text-align:left}
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
ol.man-decor li.tr {text-align:right;float:right}
</style>
</head>
<!--
The following styles are deprecated and will be removed at some point:
div#man, div#man ol.man, div#man ol.head, div#man ol.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="#DESCRIPTION">DESCRIPTION</a>
<a href="#OPTIONS">OPTIONS</a>
<a href="#AUTHENTICATION">AUTHENTICATION</a>
<a href="#CONFIGURATION">CONFIGURATION</a>
<a href="#ENVIRONMENT">ENVIRONMENT</a>
<a href="#EXAMPLES">EXAMPLES</a>
<a href="#BUGS">BUGS</a>
<a href="#AUTHOR">AUTHOR</a>
<a href="#SEE-ALSO">SEE ALSO</a>
</div>
<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>
</ol>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>gist</code> - <span class="man-whatis">gist on the command line</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>gist</code> [<code>-p</code>] [<code>-t extension</code>] <var>FILE|-</var></p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p><code>gist</code> can be used to create gists on gist.github.com 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
<code>CONFIGURATION</code>).</p>
<p>These options can be used to change this behavior:</p>
<dl>
<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>
</dl>
<p>You may additionally ask for help:</p>
<dl>
<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>
</dl>
<h2 id="AUTHENTICATION">AUTHENTICATION</h2>
<p>There are two ways to set GitHub user and password info:</p>
<ul>
<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>
</ul>
<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
</code></pre>
<p>Or, set the GitHub username with:</p>
<pre><code>$ git config --global github.user &lt;username>
</code></pre>
<p>See <a href="http://github.com/guides/local-github-config" data-bare-link="true">http://github.com/guides/local-github-config</a> for more
information.</p>
<h2 id="CONFIGURATION">CONFIGURATION</h2>
<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>
<ul>
<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>
</ul>
<h2 id="ENVIRONMENT">ENVIRONMENT</h2>
<p>The following environment variables affect the execution of <code>gist</code>:</p>
<ul>
<li>HTTP_PROXY - Proxy to use when Gisting. Should be "http://host:port/"</li>
</ul>
<h2 id="EXAMPLES">EXAMPLES</h2>
<pre><code>$ gist &lt; file.txt
$ echo secret | gist --private
$ echo "puts :hi" | gist -t rb
$ gist script.py
$ gist -
the quick brown fox jumps over the lazy dog
^D
</code></pre>
<h2 id="BUGS">BUGS</h2>
<p><a href="http://github.com/defunkt/gist/issues" data-bare-link="true">http://github.com/defunkt/gist/issues</a></p>
<h2 id="AUTHOR">AUTHOR</h2>
<p>Chris Wanstrath :: chris@ozmm.org</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="http://github.com" data-bare-link="true">http://github.com</a>,
<a href="http://github.com/defunkt/gist" data-bare-link="true">http://github.com/defunkt/gist</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>
</ol>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.