From 4f9d3151746009dbf3412ce68ab94cb3005fa0a5 Mon Sep 17 00:00:00 2001 From: Flammie A Pirinen Date: Thu, 3 Oct 2024 12:46:11 +0200 Subject: [PATCH] fix sh generation in modefile --- src/pipespec.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipespec.cpp b/src/pipespec.cpp index 071fa02..657b6bf 100644 --- a/src/pipespec.cpp +++ b/src/pipespec.cpp @@ -332,8 +332,10 @@ std::vector> toPipeSpecShVector( } else if (name == "sh") { prog = cmd.attribute("prog").value(); - for (auto& a : args) { - prog += argprepare(a.second); + for (const pugi::xml_node& arg : cmd.children()) { + if (strcmp(arg.name(), "arg") == 0) { + prog += argprepare(arg.text().get()); + } } } else if (name == "prefs") {