Even though that works fine on the command line.
- char *editor = getenv("VISUAL") ?: getenv("EDITOR") ?: "vi";
+ xasprintf(&command, "\"%s\" \"%s\"", getenv("VISUAL") ?: getenv("EDITOR") ?: "vi", filename);
+ xasprintf(&command, "edit \"%s\"", filename);
-
- char *command;
- xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
int result = system(command);
if(result)
return result;
int result = system(command);
if(result)
return result;