Introduction
Introduction Statistics Contact Development Disclaimer Help
tuse SHELL environment variable (thx Thomas Adam) - st - [fork] customized buil…
git clone git://src.adamsgaard.dk/st
Log
Files
Refs
README
LICENSE
---
commit d01c55c9ab58588d98239c515aa8db6443ae75ca
parent b3b7ffce5f1cb1d82aa26df976f0316d89d15d7f
Author: AurĂ©lien Aptel <[email protected]>
Date: Mon, 26 Apr 2010 19:20:53 +0200
use SHELL environment variable (thx Thomas Adam)
Diffstat:
M config.h | 1 -
M st.c | 10 ++++++----
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/config.h b/config.h
t@@ -1,4 +1,3 @@
-#define SHELL "/bin/bash"
#define TAB 8
#define FONT "6x13"
diff --git a/st.c b/st.c
t@@ -208,9 +208,12 @@ die(const char *errstr, ...) {
void
execsh(void) {
- char *args[3] = {SHELL, "-i", NULL};
+ char *shell = getenv("SHELL");
+ if(!shell)
+ shell = "/bin/sh";
+ char *args[3] = {shell, "-i", NULL};
putenv("TERM=" TNAME);
- execvp(SHELL, args);
+ execvp(shell, args);
}
void
t@@ -844,7 +847,6 @@ tputtab(void) {
void
tputc(char c) {
- /* dump(c); */
if(term.esc & ESC_START) {
if(term.esc & ESC_CSI) {
escseq.buf[escseq.len++] = c;
t@@ -1277,7 +1279,7 @@ run(void) {
}
if(FD_ISSET(cmdfd, &rfd)) {
ttyread();
- draw(SCREEN_UPDATE);
+ draw(SCREEN_UPDATE);
}
while(XPending(xw.dis)) {
XNextEvent(xw.dis, &ev);
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.