summaryrefslogtreecommitdiff
path: root/src/command_manager.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-08-26 21:00:08 +1000
committerMaxime Coste <mawww@kakoune.org>2024-08-26 21:00:08 +1000
commit9275d965a6952d44035fd0502ee0d3991352c460 (patch)
treec3a0abf7b582c3bc53a492c1e1d3dbc72d215879 /src/command_manager.cc
parent202747e68896aebbe38cc160391629e020f0c2a1 (diff)
Do not gather full input data in a single string when piping
Refactor ShellManager and pipe to feed lines from the buffer directly, this should reduce memory use when piping big chunks of buffers. The pipe output is still provided as a single big buffer.
Diffstat (limited to 'src/command_manager.cc')
-rw-r--r--src/command_manager.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc
index 3e44ab1e..fd32f93c 100644
--- a/src/command_manager.cc
+++ b/src/command_manager.cc
@@ -350,7 +350,8 @@ void expand_token(Token&& token, const Context& context, const ShellContext& she
case Token::Type::ShellExpand:
{
auto str = ShellManager::instance().eval(
- content, context, {}, ShellManager::Flags::WaitForStdout,
+ content, context, StringView{},
+ ShellManager::Flags::WaitForStdout,
shell_context).first;
if (not str.empty() and str.back() == '\n')