18 releases

new 0.4.4 Nov 27, 2024
0.4.2 Feb 2, 2024
0.4.1 Dec 13, 2023
0.4.0 Sep 7, 2023
0.2.1 Mar 31, 2022

#103 in Text processing

Download history 952/week @ 2024-08-07 1024/week @ 2024-08-14 872/week @ 2024-08-21 893/week @ 2024-08-28 695/week @ 2024-09-04 742/week @ 2024-09-11 553/week @ 2024-09-18 1010/week @ 2024-09-25 1286/week @ 2024-10-02 5659/week @ 2024-10-09 6763/week @ 2024-10-16 6944/week @ 2024-10-23 6272/week @ 2024-10-30 6165/week @ 2024-11-06 3518/week @ 2024-11-13 2090/week @ 2024-11-20

18,949 downloads per month
Used in 7 crates

Unlicense

29KB
625 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
  • In-memory History
  • 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

~5–14MB
~192K SLoC