You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally reading user input from the terminal is the default behavior if you don't change anything. For example this program:
use duct::cmd;fnmain(){println!("gonna start Python");cmd!("python").run().unwrap();println!("Python exited");}
Does this (where cargo run and exit() are my keyboard input):
$ cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/scratch`
gonna start Python
Python 3.12.7 (main, Oct 1 2024, 11:15:50) [GCC 14.2.1 20240910] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
Python exited
$
(The same is true of std::process::Command.) Does that help at all, or was that already clear?
currently all the stdin options for a command are predefined files, bytes, etc.
would it be possible to connect to the stdin of the command with a loop reading user input and feeding it to the process?
The text was updated successfully, but these errors were encountered: