mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 20:15:00 +00:00
Shell: Allow a command sequence to be delimited by newlines
This commit is contained in:
parent
639c1a1737
commit
034be8e74c
3 changed files with 26 additions and 10 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue