Shell: Allow a command sequence to be delimited by newlines

This commit is contained in:
AnotherTest 2020-06-28 18:43:37 +04:30 committed by Andreas Kling
parent 639c1a1737
commit 034be8e74c
Notes: sideshowbarker 2024-07-19 05:08:52 +09:00
3 changed files with 26 additions and 10 deletions

View file

@ -497,12 +497,8 @@ bool Shell::run_file(const String& filename)
return false;
}
auto file = file_result.value();
for (;;) {
auto line = file->read_line(4096);
if (line.is_null())
break;
run_command(String::copy(line, Chomp));
}
auto data = file->read_all();
run_command(data);
return true;
}
void Shell::take_back_stdin()