Index: region.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/region.c,v
retrieving revision 1.40
diff -u -p -r1.40 region.c
--- region.c 8 Mar 2023 04:43:11 -0000 1.40
+++ region.c 27 Mar 2023 16:48:08 -0000
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <paths.h>
#include "def.h"
@@ -486,9 +487,8 @@ shellcmdoutput(char* const argv[], char*
return (FALSE);
}
- shellp = getenv("SHELL");
-
- ret = pipeio(shellp, argv, text, len, bp);
+ ret = pipeio((shellp = getenv("SHELL")) == NULL ? _PATH_BSHELL
: shellp,
+ argv, text, len, bp);
if (ret == TRUE) {
eerase();