diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-02-24 05:04:15 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-02-24 05:04:15 +0100 |
commit | 39124fd2ad6a3e0bf51d4b7c91fafef6108eacd5 (patch) | |
tree | fad2f09e7e22f21107ed18b43d9a53010d89d9ae /src/main.cpp | |
parent | 9f7f187f1860047c8cb24ca34552f31bf7a2c3ce (diff) | |
download | sciteco-39124fd2ad6a3e0bf51d4b7c91fafef6108eacd5.tar.gz |
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.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |