From ee0435101b50ea3ad9e31e265a63b8f5d63dcca0 Mon Sep 17 00:00:00 2001 From: zawwz Date: Sat, 24 Jul 2021 19:45:52 +0200 Subject: [PATCH] fix debashify of [[ =~ ]] not correctly matching --- src/debashify.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/debashify.cpp b/src/debashify.cpp index 552afeb..e640090 100644 --- a/src/debashify.cpp +++ b/src/debashify.cpp @@ -61,6 +61,7 @@ block* gen_bashtest_cmd(std::vector args) // regex matcher: use expr delete args[1]; args[1]=nullptr; + args[2]->insert(0, ".*"); add_quotes(args[2]); ret = make_cmd( std::vector({ new arg("expr"), args[0], new arg(":"), args[2] }) ); ret->redirs.push_back(new redirect(">", new arg("/dev/null") ));