replwrap style run function
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 391
- Forks
- 69
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 2
Description
It would also be nice to borrow from replwrap and have a method to fold these three lines into one:
p.send_line("hostname")?;
let hostname = p.read_line()?;
p.wait_for_prompt()?; // go sure `hostname` is really done
becomes something like
let output = p.run("hostname")?;
other things that would help missing from pexpect that I've had to add for run(): take multiple commands to pass a script that you read from the host filesystem either as a vec or by splitting on newlines, sanitizing carriage returns, stripping out colour
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing send_line, read_line, and wait_for_prompt entry points and compare the requested API with replwrap's run behavior. Define what a returned output should contain and how multiple commands, carriage returns, and color stripping are handled; done means a run-style method covers the shown hostname flow and the listed script inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100