[][src]Crate fake_tty

Run a command in bash, pretending to be a tty.

This means that the command will assume that terminal colors and other terminal features are available.

Example

let output = fake_tty::bash_command("ls").output().unwrap();
assert!(output.status.success());

let _stdout: String = fake_tty::get_stdout(output.stdout).unwrap();

Functions

bash_command

Creates a command that is executed by bash, pretending to be a tty.

get_stdout

Returns the standard output of the command.

make_script_command

Wraps the command in the script command that can execute it pretending to be a tty.