Giter Site home page Giter Site logo

rlundo's Introduction

Build Status

#rlundo

rlundo grants interactive interpreters magical undo powers! Some interpreters work without requiring compiling a new readline library:

$ python rlundo.py python
$ python rlundo.py ipython

You can undo using ctrl+c

undo with ctrl+c

The goal is for this to work with any interpreter, as in

$ python rlundo.py /usr/bin/irb

rlundo preview example

which will work if you compile the modified readline library with

cd rlundoable
make -f Makefileosx

There are three major parts to this project:

  • rlundoable - a patch for readline that makes it fork to save state
  • rewrite.py - rewinds the terminal state to how it was at the last prompt
  • undoableINTERPRETER - alternative scripts for running specific interactive interpreters so that they have undo

##rlundoable

try it with

$ python rlundo.py /usr/bin/irb

##rewrite.py

try it with

$ python rewrite.py

and then in another terminal run

nc localhost 4242

to save terminal states, and

nc localhost 4243

to restore previous terminal states

##Running the tests

  • nosetests
  • you're need to install a recent version of tmux, 1.9a seems to work

##License

Copyright 2015 Thomas Ballinger

Released under GPL3, like GNU readline.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

rlundo's People

Contributors

thomasballinger avatar abenassi avatar jackolantern avatar jdherg avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.