Hi, Here is a patch to make ^D (CTRL-D) escape from bgplgsh instead of displaying help.
Denis Index: bgplgsh.c =================================================================== RCS file: /cvs/src/usr.bin/bgplg/bgplgsh.c,v retrieving revision 1.8 diff -u -p -r1.8 bgplgsh.c --- bgplgsh.c 9 Dec 2015 17:52:24 -0000 1.8 +++ bgplgsh.c 4 Oct 2017 13:12:02 -0000 @@ -229,8 +229,8 @@ main(void) if ((line = readline(prompt)) == NULL) { printf("\n"); - lg_help(cmds, NULL); - continue; + quit = 1; + goto next; } if (!lg_strip(line)) goto next;