7 releases (4 breaking)

0.4.1 Jan 18, 2022
0.4.0 Jan 17, 2022
0.3.0 Dec 14, 2019
0.2.0 Dec 8, 2019
0.0.1 Jun 11, 2019

#907 in Command-line interface

Download history 3/week @ 2024-02-25 57/week @ 2024-03-31

57 downloads per month

LGPL-3.0-or-later

28KB
526 lines

Crates.io Build Status Documentation dependency status

shli

Rust crate for shell-like TUIs

Purpose

If you once saw nslookup, glusterfs or shelldap and admired their shell-like terminal interfaces, this might be a crate for you.

This crate provides basic building blocks for providing users of your software such an interface.

Example usage

See examples/simple.rs.

A cargo run --example simple will run it.

You will see a prompt. Type p, and then press TAB.

> p

It will autocomplete to print, an example command! Now issue this:

> print Hello

It will print "Hello", which is not spectacular. If you now press the up key, you will be able to edit your last command.

With the left and right keys, the user is able to edit the current commandline.

Documentation

https://docs.rs/shli/

Dependencies

~165KB