all repos — st @ bafbba56cd5735c680676db2adf6f614ba61356f

st (suckless terminal) config

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.
Eric Pruitt eric.pruitt@gmail.com
commit

bafbba56cd5735c680676db2adf6f614ba61356f

parent

11625c7166b7e4dad414606227acec2de1c36464

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M st.cst.c

@@ -1158,7 +1158,10 @@ else

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)