On 4/8/25 9:16 PM, Lawrence D'Oliveiro wrote:
On Tue, 08 Apr 2025 15:39:47 +0300, Anssi Saari wrote:
The only time I've had to use vi command history editing was with some
old version of VxWorks. It was the only kind included by default. I
ended up teaching some colleagues on how to edit the command line, vi
style.
Seems a bit dumb, having to go into insert mode every time you actually
want to type a command.
It's terrible - and was obsolete already by 1985.
On 4/8/25 9:16 PM, Lawrence D'Oliveiro wrote:
On Tue, 08 Apr 2025 15:39:47 +0300, Anssi Saari wrote:
The only time I've had to use vi command history editing was with
some old version of VxWorks. It was the only kind included by
default. I ended up teaching some colleagues on how to edit the
command line, vi style.
Seems a bit dumb, having to go into insert mode every time you
actually want to type a command.
That's not how it works.
After the shell writes a command prompt, it is
in insert mode, so you just type a command as normal. To edit the
current command, or search the history, you type ESC to get out of
insert mode and then perform the edit or search just like in vi (except
that RETURN executes the edited command instead of moving to the next "line").
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).
On Wed, 9 Apr 2025 13:26:48 +0100, Geoff Clare wrote:
On 4/8/25 9:16 PM, Lawrence D'Oliveiro wrote:
Seems a bit dumb, having to go into insert mode every time youThat's not how it works.
actually want to type a command.
But that’s how the vi/vim editor family works. Are you saying that a command-line editor that is supposed to work like those editors doesn’t in fact, emulate them entirely faithfully?
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?
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 shellsIt’s not the shell specifically that supports it, remember. It’s actually
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.
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.
can't think of any other programs where he encounters readline()
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>
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.
In comp.os.linux.misc, Lawrence D'Oliveiro <[email protected]d> 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.
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?
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 38:41:59 |
| Calls: | 12,109 |
| Files: | 15,006 |
| Messages: | 6,518,383 |