oh-my-fish/plugins/tiny
2015-02-11 00:49:31 +09:00
..
spec add new plugin: tiny 2015-02-08 20:04:46 +09:00
README.md add new plugin: tiny 2015-02-08 20:04:46 +09:00
tiny.fish Change tiny declared globals to local scope. 2015-02-11 00:49:31 +09:00
tiny.help.fish add new plugin: tiny 2015-02-08 20:04:46 +09:00

tiny

git.io for the lazy

Synopsis

tiny [-u --user <username>]
     [-r --repo <repository>]
     [-c --code <vanity code>]
     [-o --open]
     [-h --help]

tiny [-c --code] [-o --open] owned-repo/url

Description

Tap into git.io, github's URL shortener service, to easily shorten any github URL. The generated URL is printed to stdout and copied to the clipboard. You can optionally specify the -o flag to open it up on your browser too.

Options

-u --user

Username. If omitted, the git global config is queried.

-r --repo

Repository name.

-c --code

Own code to setup a personal vanity URL. A regular short URL is generated if the specified code is not available.

-o --open

Open the short URL in the browser.

-h --help

Display usage help.

Default Options

It's possible to omit the -u option and just specify the url to shorten.

tiny my-awesome-repo

In this case, the username will be retrieved from your git configuration file. You can add your github username to git's configuration like this:

git config github.user <your username>

Another common use case is to simply copy paste an existing URL into the terminal:

tiny [-o --open] http://github.com/facebook/react

Diagnostics

The following error codes are generated:

  • 1 git.io failed to shorten the URL

  • 2 invalid input or no input.

License

MIT © Jorge Bucaran