Skip to content

Commit 063a1da

Browse files
committed
change builtins to "util"
1 parent 95b6361 commit 063a1da

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::env;
33
use std::io;
44
use std::io::Write;
55

6-
mod builtins;
6+
mod util;
77

88
fn eval(input: &str, history: &mut VecDeque<String>) -> bool {
99
let mut args = input.trim().split_whitespace();
@@ -16,11 +16,11 @@ fn eval(input: &str, history: &mut VecDeque<String>) -> bool {
1616
}
1717
match command {
1818
"exit" => return true,
19-
"history" => builtins::history(history, &other_args),
20-
"pwd" => builtins::pwd(&other_args),
21-
"ls" => builtins::ls(&other_args),
22-
"cd" => builtins::cd(&other_args),
23-
_ => builtins::cmd(command, &other_args),
19+
"history" => util::history(history, &other_args),
20+
"pwd" => util::pwd(&other_args),
21+
"ls" => util::ls(&other_args),
22+
"cd" => util::cd(&other_args),
23+
_ => util::cmd(command, &other_args),
2424
}
2525
}
2626

src/builtins.rs src/util.rs

File renamed without changes.

0 commit comments

Comments
 (0)