Sujet : Shell command history (was: Useless Use Of Regexes)
De : geoff (at) *nospam* clare.See-My-Signature.invalid (Geoff Clare)
Groupes : comp.os.linux.miscDate : 09. Apr 2025, 13:26:48
Autres entêtes
Message-ID : <8l5icl-uad.ln1@ID-313840.user.individual.net>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.154 (Izium; 517acf4)
c186282 wrote:
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's terrible - and was obsolete already by 1985.
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).
-- Geoff Clare <netnews@gclare.org.uk>