[][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 --color=auto").output().unwrap();
assert!(output.status.success());

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

Functions

bash_command

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

make_script_command

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