Introduction
Introduction Statistics Contact Development Disclaimer Help
t-e flag handles arguments. - st - [fork] customized build of st, the simple te…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit 732b9601ed2543b1fa6acbc08ddc05818279265f
parent 54bc450dbf057e66bed5f10d13d90a469e5ca8ae
Author: AurĂ©lien Aptel <[email protected]>
Date: Sun, 28 Nov 2010 13:17:20 +0100
-e flag handles arguments.
Diffstat:
M st.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/st.c b/st.c
t@@ -545,11 +545,15 @@ die(const char *errstr, ...) {
void
execsh(void) {
- char *args[] = {getenv("SHELL"), "-i", NULL};
+ char **args;
+ char *envshell = getenv("SHELL");
+ DEFAULT(envshell, "sh");
+
if(opt_cmd)
- args[0] = opt_cmd, args[1] = NULL;
+ args = (char*[]){"sh", "-c", opt_cmd, NULL};
else
- DEFAULT(args[0], SHELL);
+ args = (char*[]){envshell, "-i", NULL};
+
putenv("TERM="TNAME);
execvp(args[0], args);
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.