16 releases

0.4.2 Feb 2, 2024
0.4.1 Dec 13, 2023
0.4.0 Sep 7, 2023
0.3.2 May 27, 2023
0.2.1 Mar 31, 2022

#135 in Text processing

Download history 506/week @ 2023-12-22 756/week @ 2023-12-29 1225/week @ 2024-01-05 1419/week @ 2024-01-12 1822/week @ 2024-01-19 1933/week @ 2024-01-26 2017/week @ 2024-02-02 1279/week @ 2024-02-09 1250/week @ 2024-02-16 1374/week @ 2024-02-23 1339/week @ 2024-03-01 1309/week @ 2024-03-08 1094/week @ 2024-03-15 1136/week @ 2024-03-22 868/week @ 2024-03-29 1015/week @ 2024-04-05

4,282 downloads per month
Used in 5 crates

Unlicense

28KB
621 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

~2.9–10MB
~71K SLoC