mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-22 07:15:59 +01:00
use SHELL environment variable (thx Thomas Adam)
This commit is contained in:
parent
b3b7ffce5f
commit
d01c55c9ab
2 changed files with 6 additions and 5 deletions
1
config.h
1
config.h
|
@ -1,4 +1,3 @@
|
||||||
#define SHELL "/bin/bash"
|
|
||||||
#define TAB 8
|
#define TAB 8
|
||||||
|
|
||||||
#define FONT "6x13"
|
#define FONT "6x13"
|
||||||
|
|
10
st.c
10
st.c
|
@ -208,9 +208,12 @@ die(const char *errstr, ...) {
|
||||||
|
|
||||||
void
|
void
|
||||||
execsh(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);
|
putenv("TERM=" TNAME);
|
||||||
execvp(SHELL, args);
|
execvp(shell, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -844,7 +847,6 @@ tputtab(void) {
|
||||||
|
|
||||||
void
|
void
|
||||||
tputc(char c) {
|
tputc(char c) {
|
||||||
/* dump(c); */
|
|
||||||
if(term.esc & ESC_START) {
|
if(term.esc & ESC_START) {
|
||||||
if(term.esc & ESC_CSI) {
|
if(term.esc & ESC_CSI) {
|
||||||
escseq.buf[escseq.len++] = c;
|
escseq.buf[escseq.len++] = c;
|
||||||
|
@ -1277,7 +1279,7 @@ run(void) {
|
||||||
}
|
}
|
||||||
if(FD_ISSET(cmdfd, &rfd)) {
|
if(FD_ISSET(cmdfd, &rfd)) {
|
||||||
ttyread();
|
ttyread();
|
||||||
draw(SCREEN_UPDATE);
|
draw(SCREEN_UPDATE);
|
||||||
}
|
}
|
||||||
while(XPending(xw.dis)) {
|
while(XPending(xw.dis)) {
|
||||||
XNextEvent(xw.dis, &ev);
|
XNextEvent(xw.dis, &ev);
|
||||||
|
|
Loading…
Reference in a new issue