• Re: Shell command history

    From Nuno Silva@21:1/5 to Lawrence D'Oliveiro on Mon Apr 14 09:47:22 2025
    On 2025-04-12, Lawrence D'Oliveiro wrote:

    On Wed, 9 Apr 2025 13:26:48 +0100, Geoff Clare wrote:

    It became an IEEE standard in 1992 (and ISO in 1993) for
    POSIX-conforming shells, and has remained standard to this day. IEEE
    chose not to include emacs mode, so effectively it is emacs mode that
    was treated as obsolete (in 1992).

    Nevertheless, that is the one that is most commonly used in *nix systems today.

    Oh, I didn't know Emacs edit mode was that common, which other shells
    support it besides GNU bash?

    (Yes, we're in comp.os.linux.misc, but, following the mention of "*nix systems", I'm talking about shells in all such systems, not just
    linux-based systems.)

    --
    Nuno Silva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Nuno Silva on Mon Apr 14 22:37:06 2025
    On Mon, 14 Apr 2025 09:47:22 +0100, Nuno Silva wrote:

    Oh, I didn't know Emacs edit mode was that common, which other shells
    support it besides GNU bash?

    It’s not the shell specifically that supports it, remember. It’s actually
    a separate library called GNU readline, that is also used by a lot of
    other software.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to ldo@nz.invalid on Tue Apr 15 23:28:35 2025
    In comp.os.linux.misc, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 14 Apr 2025 09:47:22 +0100, Nuno Silva wrote:
    Oh, I didn't know Emacs edit mode was that common, which other shells
    support it besides GNU bash?
    It’s not the shell specifically that supports it, remember. It’s actually

    Well akshuly. In ksh it is built into the shell, not gnu. That's how I
    used it with the shells on HP-UX and Solaris.

    It’s not the shell specifically that supports it, remember. It’s actually a separate library called GNU readline, that is also used by a lot of
    other software.

    Gnu readline is used in bc(1), for example, which lets me have have vi
    mode there, but it has also caused the bc developers to lose the ability
    to have blank lines from a user hitting enter twice.

    I complained to bug-bc@gnu.org in 2022 about this and got back a reply
    from Phil Nelson:

    | This appears to be a GNU Readline issue. Readline never sends the
    | blank line to bc. I've tried to track it down, but with no success.

    Elijah
    ------
    can't think of any other programs where he encounters readline()

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Eder@21:1/5 to Eli the Bearded on Wed Apr 16 10:09:02 2025
    On Di 15 Apr 2025 at 23:28, Eli the Bearded <*@eli.users.panix.com> wrote:

    Well akshuly. In ksh it is built into the shell, not gnu. That's how I
    used it with the shells on HP-UX and Solaris.

    In zsh it is the same - no readline there.

    'Andreas
    --
    ceterum censeo redmondinem esse delendam

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Eli the Bearded on Wed Apr 16 21:33:01 2025
    On Tue, 15 Apr 2025 23:28:35 -0000 (UTC), Eli the Bearded wrote:

    can't think of any other programs where he encounters readline()

    <https://docs.python.org/3/library/readline.html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to ldo@nz.invalid on Fri Apr 18 04:22:27 2025
    In comp.os.linux.misc, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Tue, 15 Apr 2025 23:28:35 -0000 (UTC), Eli the Bearded wrote:
    can't think of any other programs where he encounters readline()
    <https://docs.python.org/3/library/readline.html>

    That's just a wrapper to use in in Python scripts that interact with
    the user. I do not believe I have ever encountered a script using it.
    But that does remind me that the Perl CPAN shell can optionally use
    the Perl wrapper of the readline library. I don't usually have that
    Perl wrapper installed however.

    Elijah
    ------
    knows it is used in programs outside his concern

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nuno Silva@21:1/5 to Lawrence D'Oliveiro on Fri Apr 18 10:31:13 2025
    On 2025-04-14, Lawrence D'Oliveiro wrote:

    On Mon, 14 Apr 2025 09:47:22 +0100, Nuno Silva wrote:

    Oh, I didn't know Emacs edit mode was that common, which other shells
    support it besides GNU bash?

    It’s not the shell specifically that supports it, remember. It’s actually a separate library called GNU readline, that is also used by a lot of
    other software.

    What is "*the* shell"?

    The question is the same, whether this is implemented internally or in a separate library (GNU or non-GNU). Are Emacs keybindings that usual in
    UNIX shells?

    --
    Nuno Silva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to Eli the Bearded on Sat Apr 19 22:34:49 2025
    On Fri, 18 Apr 2025 04:22:27 -0000 (UTC), Eli the Bearded wrote:

    In comp.os.linux.misc, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    On Tue, 15 Apr 2025 23:28:35 -0000 (UTC), Eli the Bearded wrote:

    can't think of any other programs where he encounters readline()

    <https://docs.python.org/3/library/readline.html>

    That's just a wrapper to use in in Python scripts that interact with
    the user.

    ldo@theon:~> apt-cache rdepends libreadline8t64 | wc -l
    325

    Do you want a full list?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to ldo@nz.invalid on Sun Apr 20 18:26:35 2025
    In comp.os.linux.misc, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    On Fri, 18 Apr 2025 04:22:27 -0000 (UTC), Eli the Bearded wrote:
    That's just a wrapper to use in in Python scripts that interact with
    the user.

    ldo@theon:~> apt-cache rdepends libreadline8t64 | wc -l
    325

    Do you want a full list?

    The things using libreadline and the things using the Python libreadline
    are different. sqlite3, for example, is in the list, but isn't using
    Python. I've already pointed out there's a Perl libreadline library,
    too.

    (I perused the full list on my system and very few were things that I
    have run in say, the last 12 months, but sqlite3 and gdb are there and
    I've used those.)

    Elijah
    ------
    not quite sure why inkscape is on the list

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