mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 18:32:28 -05:00
Shell: Resolve aliases in builtin_time
This commit is contained in:
parent
b0ce8d725a
commit
7170df7dd8
1 changed files with 8 additions and 5 deletions
|
@ -698,14 +698,17 @@ int Shell::builtin_time(int argc, const char** argv)
|
|||
for (auto& arg : args)
|
||||
command.argv.append(arg);
|
||||
|
||||
auto commands = expand_aliases({ move(command) });
|
||||
|
||||
Core::ElapsedTimer timer;
|
||||
int exit_code = 1;
|
||||
timer.start();
|
||||
auto job = run_command(command);
|
||||
if (!job)
|
||||
return 1;
|
||||
block_on_job(job);
|
||||
for (auto& job : run_commands(commands)) {
|
||||
block_on_job(job);
|
||||
exit_code = job->exit_code();
|
||||
}
|
||||
fprintf(stderr, "Time: %d ms\n", timer.elapsed());
|
||||
return job->exit_code();
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
int Shell::builtin_umask(int argc, const char** argv)
|
||||
|
|
Loading…
Add table
Reference in a new issue