Index: lldb/source/Utility/Args.cpp =================================================================== --- lldb/source/Utility/Args.cpp +++ lldb/source/Utility/Args.cpp @@ -386,6 +386,7 @@ static ShellDescriptor g_Shells[] = {{ConstString("bash"), " '\"<>()&"}, {ConstString("tcsh"), " '\"<>()&$"}, + {ConstString("zsh"), " '\"<>()&$;"}, {ConstString("sh"), " '\"<>()&"}}; // safe minimal set Index: lldb/unittests/Utility/ArgsTest.cpp =================================================================== --- lldb/unittests/Utility/ArgsTest.cpp +++ lldb/unittests/Utility/ArgsTest.cpp @@ -322,6 +322,10 @@ EXPECT_EQ(Args::GetShellSafeArgument(bash, "a\""), "a\\\""); EXPECT_EQ(Args::GetShellSafeArgument(bash, "a\"b"), "a\\\"b"); + FileSpec zsh("/bin/zsh", FileSpec::Style::posix); + EXPECT_EQ(Args::GetShellSafeArgument(zsh, R"('"$;()<>&)"), + R"(\'\"\$\;\(\)\<\>\&)"); + // String that doesn't need to be escaped EXPECT_EQ(Args::GetShellSafeArgument(bash, "a"), "a");