Rustyline, but with async support
Find a file
2024-11-20 16:35:02 -05:00
examples add help command to example 2024-08-05 15:28:19 -04:00
src Merge remote-tracking branch 'upstream/main' 2024-11-20 16:35:02 -05:00
.envrc update flake & cargo 2023-09-03 16:00:52 -04:00
.gitignore update flake & cargo 2023-09-03 16:00:52 -04:00
Cargo.lock update deps 2024-11-19 16:40:22 +00:00
Cargo.toml update deps 2024-11-19 16:40:22 +00:00
flake.lock update flake 2024-11-19 17:22:50 +00:00
flake.nix update a bunch of stuff 2023-12-12 22:27:33 -05:00
README.md Some README tweaks 2023-12-01 18:33:28 -05:00
rust-toolchain.toml update a bunch of stuff 2023-12-12 22:27:33 -05:00
rustfmt.toml initial commit 2022-03-22 20:44:18 -04:00
UNLICENSE Create UNLICENSE 2022-06-16 13:24:23 +00:00

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.