Compare commits
No commits in common. "v1.1.0" and "v1.0.0" have entirely different histories.
2 changed files with 2 additions and 19 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -1,7 +0,0 @@
|
||||||
# This file is automatically @generated by Cargo.
|
|
||||||
# It is not intended for manual editing.
|
|
||||||
version = 3
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "jshell"
|
|
||||||
version = "0.1.0"
|
|
14
src/main.rs
14
src/main.rs
|
@ -1,13 +1,3 @@
|
||||||
use std::{io::stdin, process::Command};
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
fn main(){
|
|
||||||
let mut input = String::new();
|
|
||||||
stdin().read_line(&mut input).unwrap();
|
|
||||||
|
|
||||||
// read_line leaves a trailing newline, which trim removes
|
|
||||||
let command = input.trim();
|
|
||||||
|
|
||||||
Command::new(command)
|
|
||||||
.spawn()
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue