Expand description
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").unwrap()
.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.
- command
- Creates a command that is executed by a shell, 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.