From 4a26ea984756289dfc9e58617d295ff351839907 Mon Sep 17 00:00:00 2001 From: Jim Monte Date: Fri, 14 Jun 2019 23:01:59 +0200 Subject: [PATCH] [PATCH #64] Made shell command with no arguments functional for Windows. --- src/frontend/com_shell.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/frontend/com_shell.c b/src/frontend/com_shell.c index 8452c73ab..fedf1cb19 100644 --- a/src/frontend/com_shell.c +++ b/src/frontend/com_shell.c @@ -10,16 +10,22 @@ #include "ngspice/cpextern.h" -/* Fork a shell. */ +#ifdef _WIN32 +#define SHELL "cmd /k" +#else +#define SHELL "/bin/csh" +#endif +/* Fork a shell. */ void com_shell(wordlist *wl) { char *com, *shell = NULL; shell = getenv("SHELL"); - if (shell == NULL) - shell = "/bin/csh"; + if (shell == NULL) { + shell = SHELL; + } cp_ccon(FALSE);