1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:07:34 +00:00

Assistant: Trim terminal command before displaying or running it

This commit is contained in:
LuK1337 2021-07-19 13:30:09 +02:00 committed by Andreas Kling
parent 941087ee25
commit 35b930112f

View file

@ -209,7 +209,7 @@ void TerminalProvider::query(String const& query, Function<void(NonnullRefPtrVec
if (!query.starts_with('$'))
return;
auto command = query.substring(1);
auto command = query.substring(1).trim_whitespace();
NonnullRefPtrVector<Result> results;
results.append(adopt_ref(*new TerminalResult(move(command))));