all repos — st @ 732b9601ed2543b1fa6acbc08ddc05818279265f

st (suckless terminal) config

-e flag handles arguments.
Aurélien Aptel aurelien.aptel@gmail.com
commit

732b9601ed2543b1fa6acbc08ddc05818279265f

parent

54bc450dbf057e66bed5f10d13d90a469e5ca8ae

1 files changed, 7 insertions(+), 3 deletions(-)

jump to
M st.cst.c

@@ -545,11 +545,15 @@ }

void execsh(void) { - char *args[] = {getenv("SHELL"), "-i", NULL}; + char **args; + char *envshell = getenv("SHELL"); + DEFAULT(envshell, "sh"); + if(opt_cmd) - args[0] = opt_cmd, args[1] = NULL; + args = (char*[]){"sh", "-c", opt_cmd, NULL}; else - DEFAULT(args[0], SHELL); + args = (char*[]){envshell, "-i", NULL}; + putenv("TERM="TNAME); execvp(args[0], args); }