src/wins.c: Run editor and pager in a shell

This allows for specifying an editor or a pager with additional command
line parameters, such as "vim -e". Instead of interpreting "vim -e" as
an executable file, we leave it to the shell to tokenize and parse the
editor command now.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-05-16 16:00:00 +02:00
parent ce13b70c5a
commit 49d6e19a6b

View File

@ -626,7 +626,7 @@ wins_launch_external (const char *file, const char *cmd)
int pid;
wins_prepare_external ();
if ((pid = fork_exec (NULL, NULL, cmd, arg)))
if ((pid = shell_exec (NULL, NULL, *arg, arg)))
child_wait (NULL, NULL, pid);
wins_unprepare_external ();
}