Registry / testing / rexpect

rexpect

JSON →
library0.7.1rscratesunverified

Interact with unix processes/bash the same way as pexpect or Don libes expect does.

# Cargo.toml [dependencies] rexpect = "0.7.1"
INSTALL
IMPORT
SIG · REXPECT
R
rexpect
testingrustv0.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

spawn
use rexpect::session::spawn;

Spawns a bash process and sends commands.

use rexpect::session::spawn; fn main() -> Result<(), Box<dyn std::error::Error>> { let mut p = spawn("bash", Some(1000))?; p.send_line("echo hello")?; p.exp_eof()?; Ok(()) }
Debug
Known issues
gotchaOnly works on Unix-like systems; not supported on Windows.
fix
Use only on Linux/macOS or consider alternative for Windows.
affects: >=0.7.0
Upgrade
Version history
0.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
rexpect — cargo add rexpect · libregistry