20 releases

0.4.6 Apr 26, 2025
0.4.5 Dec 30, 2024
0.4.4 Nov 27, 2024
0.4.2 Feb 2, 2024
0.2.1 Mar 31, 2022

#83 in Command-line interface

Download history 1804/week @ 2025-01-29 2059/week @ 2025-02-05 2281/week @ 2025-02-12 2992/week @ 2025-02-19 2712/week @ 2025-02-26 2420/week @ 2025-03-05 2659/week @ 2025-03-12 2764/week @ 2025-03-19 3103/week @ 2025-03-26 3032/week @ 2025-04-02 3595/week @ 2025-04-09 2706/week @ 2025-04-16 4115/week @ 2025-04-23 3213/week @ 2025-04-30 2932/week @ 2025-05-07 3361/week @ 2025-05-14

14,136 downloads per month
Used in 8 crates

Unlicense

33KB
725 lines

RustyLine Async

Docs

A minimal readline with multiline and async support.

Inspired by rustyline, async-readline, & termion-async-input. Built using crossterm.

Features

  • Works on all platforms supported by crossterm.
  • Full Unicode Support (Including Grapheme Clusters)
  • Multiline Editing
  • History + Saving/Loading APIs
  • Ctrl-C, Ctrl-D are returned as Ok(Interrupt) and Ok(Eof) ReadlineEvents.
  • Ctrl-U to clear line before cursor
  • Ctrl-left & right to move to next or previous whitespace
  • Home/Ctrl-A and End/Ctrl-E to jump to the start and end of the input (Ctrl-A & Ctrl-E can be toggled off by disabling the "emacs" feature)
  • Ctrl-L clear screen
  • Ctrl-W delete until previous space
  • Extensible design based on crossterm's event-stream feature

Feel free to PR to add more features!

Example:

cargo run --example readline

rustyline-async

License

This software is licensed under The Unlicense license.

Dependencies

~6–15MB
~208K SLoC