bug-ed
[Top][All Lists]
Advanced

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

Re: Ed with Readline


From: Martin Guy
Subject: Re: Ed with Readline
Date: Fri, 16 Oct 2020 15:31:08 +0200

>> $ rlwrap ed

Nice! I didn't know of that one.

[rant on]
Making every program include the same library to provide line
editing/completion suggests that this functionality is misplaced, and
should be done in the kernel's tty driver when in cooked mode, not in
userspace.

Introducing that would give the same editing to all command-line
programs, and those already using readline shouldn't break as they'd
be piloting the tty in a non-cooked mode.

I even know of one interpreter whose author wanted these capabilities
for everyone, but couldn't use readline as he had chosen not to
open-source his work.

In fact, the vestige of a mechanism to do that is already there, doing
erase (Del or Backspace), werase (^W) and reprint (^R) and a few
others before handing the whole line to the program when Enter is hit.
Would it be that hard to add left- and right-arrow, Home and End and
handle insertion/deletion in the middle of the line?
[rant off!]

Of course, this has nothing to do with bug-ed...

    M



reply via email to

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