From bc675bd270feca9ede93d7489ab710fbfec6a77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 14 Oct 2024 13:31:50 +0200 Subject: [PATCH] exec: fix execution of command with `/exec -pipe` (issue #2199) --- src/plugins/exec/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index e6f88bd4a..4f4eefce5 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -274,8 +274,6 @@ exec_display_line (struct t_exec_cmd *exec_cmd, struct t_gui_buffer *buffer, NULL, NULL); if (!options) return; - if (!exec_cmd->output_to_buffer_exec_cmd) - weechat_hashtable_set (options, "commands", "-"); exec_cmd->output_line_nb++; @@ -308,6 +306,8 @@ exec_display_line (struct t_exec_cmd *exec_cmd, struct t_gui_buffer *buffer, } else if (exec_cmd->output_to_buffer) { + if (!exec_cmd->output_to_buffer_exec_cmd) + weechat_hashtable_set (options, "commands", "-"); if (exec_cmd->line_numbers) { length = 32 + strlen (line_color) + 1;