On Wed, Oct 04 2017, Denis Fondras <[email protected]> wrote:
> Hi,
>
> Here is a patch to make ^D (CTRL-D) escape from bgplgsh instead of displaying
> help.
This makes sense, but I'm wondering if this changes anything when
actually using bgplg? Reyk, do you remember if there was a specific
reason to keep running on EOF?
> 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;
>
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE