terminal-trx

Crates.ioterminal-trx
lib.rsterminal-trx
version0.2.3
sourcesrc
created_at2024-01-20 17:05:10.244573
updated_at2024-08-22 19:55:24.192635
descriptionProvides a handle to the terminal of the current process
homepage
repositoryhttps://github.com/bash/terminal-trx
max_upload_size
id1106637
size55,914
Tau Gärtli (bash)

documentation

README

terminal-trx

Docs Crate Version

Pronounced: Terminal T-Rex 🦖

Provides a handle to the terminal of the current process that is both readable and writable.

Example

use terminal_trx::terminal;
use std::io::{BufReader, BufRead as _, Write as _};

let mut terminal = terminal().unwrap();

write!(terminal, "hello world").unwrap();

let mut reader = BufReader::new(&mut terminal);
let mut line = String::new();
reader.read_line(&mut line).unwrap();

Docs

Wishlist

These are some features that I would like to include in this crate, but have not yet had the time to implement. Anyone is welcome to create a PR :)

  • Add integration tests.
  • Share the Terminal instance (like stdout, stderr, stdin in the standard library do). (Is this a good idea?)
  • Support enabling raw mode on MSYS/Cygwin.

Inspiration

This crate draws inspiration from many great resources, such as:

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions

Commit count: 50

cargo fmt