X-Git-Url: https://jasonwoof.com/gitweb/?p=st.git;a=blobdiff_plain;f=st.c;h=068fbb3469bd6c11aea544c57516a5d00e7509fe;hp=ad52280d62898b01f457600187d6f923aa3e00a9;hb=bafbba56cd5735c680676db2adf6f614ba61356f;hpb=11625c7166b7e4dad414606227acec2de1c36464 diff --git a/st.c b/st.c index ad52280..068fbb3 100644 --- a/st.c +++ b/st.c @@ -1158,7 +1158,10 @@ execsh(void) { die("who are you?\n"); } - sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; + if (!(sh = getenv("SHELL"))) { + sh = (pw->pw_shell[0]) ? pw->pw_shell : shell; + } + if(opt_cmd) prog = opt_cmd[0]; else if(utmp)