• TIL: Korn shell Ctrl-O: submit and stay in history.

    From Kaz Kylheku@21:1/5 to All on Mon Jul 1 03:42:59 2024
    In 2015, I implemented a feature in the TXR Lisp Listener.
    While recalling lines from history, you can use Ctrl-X Enter
    to run a line, such that it will stay in the history and move
    to the next line.

    I had not seen this anywhere before that, nor anywhere since;
    it was my independent idea.

    TIL: GNU Readline introduced this in 2021 as Ctrl-O.

    A comment in the code in misc.c says that it's from the Korn shell
    (also as Ctrl-O there).

    I see in ksh93 sources that it goes at least as far back as 2012,
    possibly farther. (On their trunk, it appears in a giant patch bomb
    commit from 2012 whose commit message list a huge swath of issues.)

    --
    TXR Programming Language: http://nongnu.org/txr
    Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
    Mastodon: @Kazinator@mstdn.ca

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Kaz Kylheku on Mon Jul 1 10:16:01 2024
    First I have to ask what "TIL" means; google search suggests
    that it might be "today I learned" - is that what you meant?

    On 01.07.2024 05:42, Kaz Kylheku wrote:
    In 2015, I implemented a feature in the TXR Lisp Listener.
    While recalling lines from history, you can use Ctrl-X Enter
    to run a line, such that it will stay in the history and move
    to the next line.

    I had not seen this anywhere before that, nor anywhere since;
    it was my independent idea.

    TIL: GNU Readline introduced this in 2021 as Ctrl-O.

    A comment in the code in misc.c says that it's from the Korn shell
    (also as Ctrl-O there).

    In Ksh it's part of Emacs-mode history editing. (Thus I don't
    know it, I'm using Vi-mode editing.)

    A very useful command, indeed!


    I see in ksh93 sources that it goes at least as far back as 2012,
    possibly farther. (On their trunk, it appears in a giant patch bomb
    commit from 2012 whose commit message list a huge swath of issues.)

    With Ksh Emacs-editing mode Ctrl-O dates back to at least 1995,
    since it's described for ksh93 in the Bolsky/Korn book. I have
    no copy of the old version of that book (that describes ksh88),
    but the appendix listing feature changes between ksh88 and ksh93
    doesn't have it listed as an Editing Change so it might have been
    already existing even in ksh88.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)