Add -- to the editor’s command line

While that may not be supported by all editors, that should be supported by most and avoids
ambiguous option interpretation.
This commit is contained in:
Frédéric Mangano
2025-07-25 16:32:28 +09:00
parent cd99ac50c7
commit 37deeb32d3

View File

@@ -239,7 +239,7 @@ std::string ot::shell_escape(std::string_view word)
void ot::run_editor(std::string_view editor, std::string_view path)
{
std::string command = std::string(editor) + " " + shell_escape(path);
std::string command = std::string(editor) + " -- " + shell_escape(path);
int status = system(command.c_str());
if (status == -1)