On Sun, Sep 20, 2020 at 06:14:22AM -0600, Todd C. Miller wrote: > On Sun, 20 Sep 2020 05:39:02 +0200, Theo Buehler wrote: > > > This works and appears to match bash's behavior in that it only works > > in normal mode. I would slightly prefer to also add the command to the > > nonstandard vi commands in the switch around line 650 to have it > > available from insert mode as well. This would match zsh's behavior. > > Sure, I was comparing it to bash so didn't support insert mode. > I agree that it's more useful to have it available there too. Works as expected, I cannot spot any regression either.
OK kn, but the could need further tweaks. > Index: bin/ksh/ksh.1 > =================================================================== > RCS file: /cvs/src/bin/ksh/ksh.1,v > retrieving revision 1.209 > diff -u -p -u -r1.209 ksh.1 > --- bin/ksh/ksh.1 7 Jul 2020 10:33:58 -0000 1.209 > +++ bin/ksh/ksh.1 20 Sep 2020 12:12:01 -0000 > @@ -5053,6 +5053,12 @@ Erases previous character. > .It ^J | ^M > End of line. > The current line is read, parsed, and executed by the shell. > +.It ^L > +Clear screen. > +The screen is cleared if the > +.Ev TERM > +parameter is set and the terminal supports clearing the screen. > +The prompt string and the current line are redrawn. This duplicates the `clear-screen' documentation in the "Emacs editing mode" paragraph, perhaps just refer to that? Otherwise it seems harder than necessary to grep for the same functionality in two places. Also, at the end of "Vi editing mode" there's another mention of `^L' which needs updating now. > .It ^V > Literal next. > The next character typed is not treated specially (can be used
