We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3db4b53 commit d008a6eCopy full SHA for d008a6e
.gitignore
@@ -0,0 +1 @@
1
+/target
Cargo.toml
@@ -0,0 +1,6 @@
+[package]
2
+name = "Rusty-Shell"
3
+version = "0.1.0"
4
+edition = "2021"
5
+
6
+[dependencies]
src/main.rs
@@ -0,0 +1,11 @@
+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();
7
8
+ Command::new(command)
9
+ .spawn()
10
+ .unwrap();
11
+}
0 commit comments