Skip to content

Xion/gisht.py

Repository files navigation

gisht

Gists in the shell

Note: This project has been discontinued in favor of its reimplementation in Rust.

Version Development Status Python versions License Build Status

With gisht, you can run scripts published as GitHub gists with a single command:

gisht Xion/git-today

Behind the scenes, gisht will fetch the gist, cache it locally, and run its code. Magic!

Installation

OS X

You can install gisht using Homebrew:

brew install https://raw.githubusercontent.com/Xion/gisht/master/gisht.rb

Other systems

Install gisht using pip, the Python package manager:

pip install gisht

Depending on how the Python interpreter is configured on your system, you may need to use sudo to install gisht globally. (Or use virtualenv).

For TAB completion of gist names, add the following to your ~/.bashrc:

eval $(register-python-autocomplete gisht)

or ~/.zshrc:

autoload bashcompinit
bashcompinit
eval $(register-python-autocomplete gisht)

Usage

If you want to pass arguments, put them after -- (two dashes):

gisht Octocat/greet -- "Hello world" --cheerful

If the gist doesn't have a proper shebang (e.g. #!/usr/bin/python), gisht will look at any file extensions and try to deduce how to run the gist.

You can also use -w (--which) option and call the interpreter explicitly:

python `gisht -w Octocat/badgist`

For more options, type:

gisht --help

Contributing

Contributions are of course very welcome! If you need some ideas, just head to the issue tracker.

This should get you started on the actual development:

pip install -r requirements-dev.txt
tox

About

DISCONTINUED -- see Xion/gisht for replacement

Resources

License

Stars

Watchers

Forks

Packages

No packages published