From 39124fd2ad6a3e0bf51d4b7c91fafef6108eacd5 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 24 Feb 2016 05:04:15 +0100 Subject: EG and EC use $SHELL and $COMSPEC as the default command interpreters now * The default command interpreter will thus be inherited from the operating system. In the case of UNIX from the user's passwd entry. E.g. if bash is used, bash extensions can be used immediately if flag 128 is not set in the ED flags. * On DOS-like systems there are also alternative interpreters (e.g. 4NT, 4OS2) that are configurable now. * At least on UNIX with $SHELL it is not guaranteed that the interpreter supports the standard command line arguments like "-c". If they don't, this will cause problems with EC. Since $SHELL is mapped to a Q-Register, it can however always be easily customized for SciTECO sessions in the user's .teco_ini. --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index bf25c73..d14e2e5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -247,6 +247,12 @@ initialize_environment(const gchar *program) g_setenv("HOME", abs_path, TRUE); g_free(abs_path); +#ifdef G_OS_WIN32 + g_setenv("COMSPEC", "cmd.exe", FALSE); +#elif defined(G_OS_UNIX) || defined(G_OS_HAIKU) + g_setenv("SHELL", "/bin/sh", FALSE); +#endif + /* * Initialize $SCITECOCONFIG and $SCITECOPATH */ -- cgit v1.2.3