st

simple terminal

git clone https://9o.is/git/st.git

commit 6a59f2afa7f6401daef63dbbeaa444c638b44c76
parent c3dc66b86a027b703045e3a3ec884520c540cdfe
Author: Eric Pruitt <eric.pruitt@gmail.com>
Date:   Tue, 28 Oct 2014 17:51:42 -0700

Check for presence of SHELL environment variable

- POSIX states the SHELL environment variable "... shall represent a
  pathname of the user's preferred command language interpreter." As
  such, st should check for its presence when deciding what shell to
  use; just as HOME can be defined to override one's passwd-defined home
  directory, a user should also be able to override their passwd-defined
  shell using the SHELL environment variable.

Diffstat:
Mst.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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)