diff -urNp -x '*.orig' mksh-59c.org/main.c mksh-59c/main.c --- mksh-59c.org/main.c 2020-10-01 22:29:21.000000000 +0200 +++ mksh-59c/main.c 2021-03-20 19:54:06.508364229 +0100 @@ -695,9 +695,14 @@ main_init(int argc, const char *argv[], if (Flag(FLOGIN)) include(substitute("$HOME/.profile", 0), 0, NULL, true); if (Flag(FTALKING)) { - cp = substitute("${ENV:-" MKSHRC_PATH "}", DOTILDE); + cp = substitute("${ENV}", DOTILDE); if (cp[0] != '\0') include(cp, 0, NULL, true); + else { + cp = substitute(MKSHRC_PATH, DOTILDE); + include("/etc/mkshrc", 0, NULL, true); + include(cp, 0, NULL, true); + } } } if (restricted_shell) {