summaryrefslogtreecommitdiff
path: root/Userland/Applications/Assistant
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2021-07-19 13:30:09 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-19 17:49:14 +0200
commit35b930112f1286bf24ef664090953e3d053199a4 (patch)
tree5d0ece0082cb24666c9e4e2dff656ebb85be0169 /Userland/Applications/Assistant
parent941087ee2572938a012df4e3fc725307e029dce4 (diff)
downloadserenity-35b930112f1286bf24ef664090953e3d053199a4.zip
Assistant: Trim terminal command before displaying or running it
Diffstat (limited to 'Userland/Applications/Assistant')
-rw-r--r--Userland/Applications/Assistant/Providers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Assistant/Providers.cpp b/Userland/Applications/Assistant/Providers.cpp
index 021bcebb6d..215408f377 100644
--- a/Userland/Applications/Assistant/Providers.cpp
+++ b/Userland/Applications/Assistant/Providers.cpp
@@ -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))));