Code Monkey home page Code Monkey logo

async-readline's Introduction

async-readline's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

async-readline's Issues

TODO: Basic things missing that make it just a PoC

  • restore normal mode on exit (on drop)
  • ability to finish the
  • detect Ctrl+C, Ctrl+D and pass to the user #1
  • arrow keys support
  • Windows support #3
  • detect TTY fallback to non-interactive mode

Afterwards:

  • history
  • some form of autocompletion

Consider publishing current master as 0.1.0?

Hello @dpc , I am wondering if we could publish the current master as 0.1.0 on crates.io.

Although this is currently only a prototype, and there are many desirable fixes and improvements we can make on current codebase to make it better suited for a public release, it would be beneficial for crates that current depends on current master:

  • To remove the dependency on this particular git repository (deleting current git repo would not cause issue for exsiting user)
  • To facilitate publishing crates in alternative repositories (currently it does not play nice with respect of alternative repo)

Is this possible to do, or is there any better alternatives now?

Does not respond well to Ctrl-C, Ctrl-D or SIGKILL

When I run cargo run --example readline and then press Ctrl-C or Ctrl-D, nothing happens.

I think this is missing the check for zero in lib.rs:127.

From the linux man page:

On success, the number of bytes read is returned (zero indicates end of file)

I tried simply returning an Err::new(UnexpectedEof, ...) but that gets ignored. I'm not sure how to tell tokio to handle errors here but maybe you know :)

Integrate into rustyline?

Thank you for this awesome work/proof of concept!

There's a discussion at rustyline, which is basically a more-or-less complete readline library without async support.

It would be terrific to port the work you have done here to rustyline, such that people can benefit from getting the tight tokio/readline integration!

I am very willing to help, but I don't think I'm really able to do it on my own :-)

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.