tlittle clean up. - st - [fork] customized build of st, the simple terminal | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 476f93794acc36ea69dfd33551e311863c8afc9a | |
parent d01c55c9ab58588d98239c515aa8db6443ae75ca | |
Author: Aurélien Aptel <[email protected]> | |
Date: Tue, 27 Apr 2010 00:04:29 +0200 | |
little clean up. | |
Diffstat: | |
M st.c | 8 +++----- | |
1 file changed, 3 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -208,12 +208,10 @@ die(const char *errstr, ...) { | |
void | |
execsh(void) { | |
- char *shell = getenv("SHELL"); | |
- if(!shell) | |
- shell = "/bin/sh"; | |
- char *args[3] = {shell, "-i", NULL}; | |
+ char *args[3] = {getenv("SHELL"), "-i", NULL}; | |
+ DEFAULT(args[0], "/bin/sh"); /* default shell if getenv() failed */ | |
putenv("TERM=" TNAME); | |
- execvp(shell, args); | |
+ execvp(args[0], args); | |
} | |
void |