changeset: 78:38096b8efa0a
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Mon Apr 26 19:20:53 2010 +0200
files: config.h st.c
description:
use SHELL environment variable (thx Thomas Adam)
diff -r bcfce8d32548 -r 38096b8efa0a config.h
--- a/config.h Mon Mar 15 23:56:38 2010 +0100
+++ b/config.h Mon Apr 26 19:20:53 2010 +0200
@@ -1,4 +1,3 @@
-#define SHELL "/bin/bash"
#define TAB 8
#define FONT "6x13"
diff -r bcfce8d32548 -r 38096b8efa0a st.c
--- a/st.c Mon Mar 15 23:56:38 2010 +0100
+++ b/st.c Mon Apr 26 19:20:53 2010 +0200
@@ -208,9 +208,12 @@
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 @@
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 @@
}
if(FD_ISSET(cmdfd, &rfd)) {
ttyread();
- draw(SCREEN_UPDATE);
+ draw(SCREEN_UPDATE);
}
while(XPending(xw.dis)) {
XNextEvent(xw.dis, &ev);
Received on Mon Apr 26 2010 - 17:28:58 UTC
This archive was generated by hypermail 2.2.0 : Mon Apr 26 2010 - 17:36:04 UTC