#terminal #tui #multiplexing

unsegen_terminal

A pluggable unsegen ANSI terminal

7 unstable releases

Uses old Rust 2015

0.3.0 Jun 3, 2021
0.2.2 Dec 5, 2020
0.2.1 Jul 13, 2020
0.2.0 Jul 21, 2019
0.0.1 Mar 4, 2019

#156 in Command-line interface

Download history 26/week @ 2021-02-25 9/week @ 2021-03-04 12/week @ 2021-03-11 8/week @ 2021-03-18 39/week @ 2021-03-25 11/week @ 2021-04-01 16/week @ 2021-04-08 23/week @ 2021-04-15 29/week @ 2021-04-22 15/week @ 2021-04-29 12/week @ 2021-05-06 15/week @ 2021-05-13 5/week @ 2021-05-20 17/week @ 2021-05-27 75/week @ 2021-06-03 37/week @ 2021-06-10

69 downloads per month
Used in ugdb

MIT license

110KB
2.5K SLoC

unsegen_terminal

unsegen_terminal provides an ANSI pseudoterminal that can be easily integrated into applications using unsegen.

Getting Started

unsegen_terminal is available on crates.io. You can install it by adding this line to your Cargo.toml:

unsegen_terminal = "0.3.0"

Examples

There is an example at the root of the crate documentation which should be sufficient to get you going.

For a fully fledged application using unsegen_terminal, you can have a look at ugdb, which was developed alongside unsegen and the primary motivation for it.

Some notes on the state

The current API for passing on bytes from the pty to the terminal widget is a bit rough, but on the flip side is quite flexible and not tied to a specific event loop. In the future, support for specific event loops (especially using Futures once they are stable) could be added.

Moreover, there are still a few unimplemented OSC handlers (see terminalwindow.rs), but the functionality is quite usable already. Most notably, ugdb, which uses unsegen_terminal itself, can debug itself. Feel free to contribute missing functionality or to create issues if you hit a roadblock.

Licensing

The majority of unsegen_terminal is released under the MIT license. This applies to all files that do not explicitly state to be licensed differently.

Dependencies

~5.5MB
~112K SLoC