Doesn't take any options. With no arguments, it assumes a file on stdin. With an arguement, it tries to display that gist ID. If there is a second arguement it'll print that filename (if it exists) from the gist.
Can both create and retrieve gists. With no arguements, it takes a file on
stdin and creates a gist. With multiple '--file' arguments, will create a
mult-file gist.
If gistid is passed in, if there is only one file in the gist, it will be
printed, otherwise will error if a specific file is not requested. However, if
'--json' is used, then multiple files can be retreived.
## Commands:
* _show_:
Show the gist <GistID>. If the gist has more than one file in it,
either a file must be specified, or --json must be used. When --json
is specified, filenames are ignored.
* _create_:
Create a gist. If no files are specified, the file is content
is read from stdin. You may specify as many files as you want.
## Options:
--public
The gist should be marked as public.
--file <file>
The file to use. If not specified, or if the filename is "-", then
contents will be read from STDIN.
--no-headers
If there is more than one file in a gist, don't separate them by
headers, simply print them all out one after another.
--json
Print all files in the gist and emit them in JSON.
## Examples:
# Retrieve the contents of a gist with a single file
$ hub gist 87560fa4ebcc8683f68ec04d9100ab1c
$ hub gist show 87560fa4ebcc8683f68ec04d9100ab1c
this is test content in testfile.txt in test gist
# Retrieve the contents of a gist with multiple files
$ hub gist 6188fb16b1a7df0f51a51e03b3a2b4e8
GIST: test gist 2 (6188fb16b1a7df0f51a51e03b3a2b4e8)
==== BEGIN testfile1.txt ====>
test content in testfile1.txt inside of test gist 2
<=== END testfile1.txt =======
==== BEGIN testfile2.txt ====>
more test content in testfile2.txt inside of test gist 2