aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--st.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/st.c b/st.c
index ad52280..068fbb3 100644
--- a/st.c
+++ b/st.c
@@ -1158,7 +1158,10 @@ execsh(void) {
1158 die("who are you?\n"); 1158 die("who are you?\n");
1159 } 1159 }
1160 1160
1161 sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; 1161 if (!(sh = getenv("SHELL"))) {
1162 sh = (pw->pw_shell[0]) ? pw->pw_shell : shell;
1163 }
1164
1162 if(opt_cmd) 1165 if(opt_cmd)
1163 prog = opt_cmd[0]; 1166 prog = opt_cmd[0];
1164 else if(utmp) 1167 else if(utmp)