Jeremie Courreges-Anglas([email protected]) on 2017.10.04 20:25:26 +0200:
> 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?
This is only in the bgplgsh shell. People should not be surprised about
Ctrl-D = quit there. And yes, the diff works.
So ok benno@, but wait a bit for a possible reply from reyk.
I also noticed that the help message does not tell you to use exit to quit
;)
>
> > 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
>