/bin/sh vi mode command line editing and the period

Bahman M. b.movaqar at gmail.com
Wed Aug 29 06:37:09 PDT 2007


> i just do the following:
>
> clear
> /bin/sh
> EDITOR=vi
> export EDITOR
> set -o $EDITOR
> echo 1
> echo 2
> echo 3
> echo 4
> <ESC-.>
>
I tested the command sequence you gave and the result was as you
explained. What caught my attention, however, was that all the
commands were builtin. I tested with non-builtin commands (eg.
/bin/echo instead of echo) and ESC-. did nothing. In fact unless the
last command was a builtin, ESC-. just repeated the last _editing_
action.
This is not a desired behaviour however IMO, to repeat the last
command (if builtin) upon a ESC-. on an empty line.
Please correct me if I'm wrong.

Bahman


More information about the freebsd-questions mailing list