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

#134 in Text processing

Download history 1087/week @ 2024-03-14 1084/week @ 2024-03-21 980/week @ 2024-03-28 1057/week @ 2024-04-04 891/week @ 2024-04-11 940/week @ 2024-04-18 888/week @ 2024-04-25 937/week @ 2024-05-02 748/week @ 2024-05-09 837/week @ 2024-05-16 851/week @ 2024-05-23 1130/week @ 2024-05-30 738/week @ 2024-06-06 1088/week @ 2024-06-13 817/week @ 2024-06-20 684/week @ 2024-06-27

3,552 downloads per month
Used in 6 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

~3–9MB
~72K SLoC