Created
April 3, 2022 12:17
-
-
Save badgerdash/2837fe57e8ca6efa0e94c80b3f864c75 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gist (v5.0.0) lets you upload to https://gist.github.com/ | |
The content to be uploaded can be passed as a list of files, if none are | |
specified STDIN will be read. The default filename for STDIN is "a.rb", and all | |
filenames can be overridden by repeating the "-f" flag. The most useful reason | |
to do this is to change the syntax highlighting. | |
All gists must to be associated with a GitHub account, so you will need to login with | |
`gist --login` to obtain an Oauth2 access token. This is stored and used by gist in the future. | |
Private gists do not have guessable URLs and can be created with "-p", you can | |
also set the description at the top of the gist by passing "-d". | |
If you would like to shorten the resulting gist URL, use the -s flag. This will | |
use GitHub's URL shortener, git.io. You can also use -R to get the link to the | |
raw gist. | |
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 -e option will copy the | |
embeddable URL to the clipboard. You can add `alias gist='gist -c'` to your | |
shell's rc file to configure this behaviour by default. | |
Instead of creating a new gist, 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. | |
If you want to skip empty files, use the --skip-empty flag. If all files are | |
empty no gist will be created. | |
Usage: gist-paste [-o|-c|-e] [-p] [-s] [-R] [-d DESC] [-u URL] | |
[--skip-empty] [-P] [-f NAME|-t EXT]* FILE* | |
gist-paste --login | |
gist-paste [-l|-r] | |
--login Authenticate gist on this computer. | |
-f, --filename [NAME.EXTENSION] Sets the filename and syntax type. | |
-t, --type [EXTENSION] Sets the file extension and syntax type. | |
-p, --private Makes your gist private. | |
--no-private | |
-d, --description DESCRIPTION Adds a description to your gist. | |
-s, --shorten Shorten the gist URL using git.io. | |
-u, --update [ URL | ID ] Update an existing gist. | |
-c, --copy Copy the resulting URL to the clipboard | |
-e, --embed Copy the embed code for the gist to the clipboard | |
-o, --open Open the resulting URL in a browser | |
--no-open | |
--skip-empty Skip gisting empty files | |
-P, --paste Paste from the clipboard to gist | |
-R, --raw Display raw URL of the new gist | |
-l, --list [USER] List all gists for user | |
-r, --read ID [FILENAME] Read a gist and print out the contents | |
--delete [ URL | ID ] Delete a gist | |
-h, --help Show this message. | |
-v, --version Print the version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment