Skip to content

Latest commit

History

182 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

liner

A Rust library offering readline-like functionality.

CONTRIBUTING.md

crates.ioBuild StatusDocs

Featues

  • Autosuggestions
  • Emacs and Vi keybindings
  • Multi-line editing
  • History
  • (Incomplete) basic and filename completions
  • Reverse search
  • Remappable keybindings

Basic Usage

In Cargo.toml:

[dependencies]
liner = "0.4.3"...

In src/main.rs:

externcrate liner;use liner::Context;fnmain(){letmut con = Context::new();loop{let res = con.read_line("[prompt]$ ",&mut |_| {}).unwrap();if res.is_empty(){break;}
con.history.push(res.into());}}

See src/main.rs for a more sophisticated example.

License

MIT licensed. See the LICENSE file.

About

A readline-like library in Rust.

Resources

Contributing

Stars

72 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages