diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-04-26 19:20:53 +0200 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2010-04-26 19:20:53 +0200 |
commit | ba9e8eafe7f32a6f6b8e1c6b7f80c38d5a7df3d3 (patch) | |
tree | 39669771cc74f2603f44f31b9d0ae2fa776cbe10 /st.c | |
parent | ba783c45170a227c0b7b0d406ba672a974abaaac (diff) | |
download | st-ba9e8eafe7f32a6f6b8e1c6b7f80c38d5a7df3d3.tar.gz st-ba9e8eafe7f32a6f6b8e1c6b7f80c38d5a7df3d3.tar.bz2 |
use SHELL environment variable (thx Thomas Adam)
Diffstat (limited to 'st.c')
-rwxr-xr-x | st.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 @@ -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; @@ -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); |