19 releases

0.4.5 Dec 30, 2024
0.4.4 Nov 27, 2024
0.4.3 Aug 5, 2024
0.4.2 Feb 2, 2024
0.2.1 Mar 31, 2022

#93 in Text processing

Download history 460/week @ 2024-09-17 1007/week @ 2024-09-24 1171/week @ 2024-10-01 4923/week @ 2024-10-08 6296/week @ 2024-10-15 7516/week @ 2024-10-22 6294/week @ 2024-10-29 5555/week @ 2024-11-05 4629/week @ 2024-11-12 2158/week @ 2024-11-19 2218/week @ 2024-11-26 1426/week @ 2024-12-03 2058/week @ 2024-12-10 1525/week @ 2024-12-17 743/week @ 2024-12-24 862/week @ 2024-12-31

5,416 downloads per month
Used in 7 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
  • 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
~197K SLoC