[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ed using Bash/Emacs commands for movement

From: Jackson Benete
Subject: Re: ed using Bash/Emacs commands for movement
Date: Tue, 8 Jun 2021 19:58:07 -0300

> If you're just trying to move the cursor around in a single line you're
> typing, that sounds like a terminal setting issue, not anything ed-specific.

Thank you Shawn!
I'm not sure if I understood.
I have some linux distros installed but I'm currently doing it using wsl2.

When I enter wsl using the `command prompt`, I already get the  key chord
support. I can move around with C-a, C-e, C-p...
If I start the busybox ed which is in `/bin/ed` I have some of those
available, like C-a, C-e, C-f, M-f, etc... I don't have C-p and C-n since
there is no history, right? But all the others just work..
If I start GNU ed which is in `/usr/local/bin/ed` I don't have the same

What puzzles me is that although command prompt is not a good terminal, it
does have support both in shell and in busybox's ed out of box, that's why
I didn't considered it a potential terminal setting issue at first.

Maybe the busybox ed is a symlink to a script that calls `rlwrap ed -v -p:`
since there is the key chord support out of the box, there is the verbosity
and a `:` prompt. Still puzzles me that some GNU ed commands don't work in
BusyBox's ed, like a `n` or `,n`, give me an "unimplemented command" error
instead of printing the range/current address with line numbers.


> If you run ed under the third-party program rlwrap you'll get the line
> editing features you're looking for.

Thank you David!
I didn't had rlwrap installed and I was not familiar with it.
Now it works, although I'm still puzzled why BusyBox's ed already have the

Anyway, is this key chord support (unsupported in this case) something
desired? I mean, is it unsupported by design?
Bringing this kind of support could introduce compatibility problems with
older OS versions, terminal or something?

Although I'll be satisfied using the rlwrap tool for this, I would be very
interested in knowing more about those kinds of details. :)

Jackson Benete

reply via email to

[Prev in Thread] Current Thread [Next in Thread]