Skip to content

Commit 13e80f5

Browse files
committed
Clean
1 parent b38efcd commit 13e80f5

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/main.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ fn main() {
6464
main_loop(&mut core);
6565
}
6666

67-
fn set_history(core: &mut ShellCore, s: &str) {
68-
if core.history.len() == 0 {
69-
return;
70-
}
71-
72-
core.history[0] = s.trim_end().replace("\n", "↵ \0").to_string();
73-
if core.history[0].len() == 0
74-
|| (core.history.len() > 1 && core.history[0] == core.history[1]) {
75-
core.history.remove(0);
76-
}
77-
}
78-
7967
fn input_interrupt_check(feeder: &mut Feeder, core: &mut ShellCore) -> bool {
8068
if ! core.sigint.load(Relaxed) { //core.input_interrupt {
8169
return false;
@@ -103,10 +91,7 @@ fn main_loop(core: &mut ShellCore) {
10391
}
10492

10593
match Script::parse(&mut feeder, core){
106-
Some(mut s) => {
107-
s.exec(core);
108-
set_history(core, &s.get_text());
109-
},
94+
Some(mut s) => s.exec(core),
11095
None => {},
11196
}
11297
core.sigint.store(false, Relaxed);

0 commit comments

Comments
 (0)