Skip to content

Commit 2a48fb4

Browse files
committed
added a repl
1 parent b2f4701 commit 2a48fb4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
use std::io::{self, Write};
33

44
fn main() {
5-
print!("$ ");
6-
io::stdout().flush().unwrap();
5+
loop{
6+
print!("$ ");
7+
io::stdout().flush().unwrap();
78

8-
let mut command = String::new();
9-
io::stdin().read_line(&mut command).unwrap();
10-
println!("{}: command not found",command.trim());
9+
let mut command = String::new();
10+
io::stdin().read_line(&mut command).unwrap();
11+
println!("{}: command not found",command.trim());
12+
}
1113
}

0 commit comments

Comments
 (0)