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

no at spam at mgedv.net nospam at mgedv.net
Mon Aug 27 01:05:53 PDT 2007


hi folks,

when someone uses set -o vi to put /bin/sh into vi-mode
for command line editing, he for example could use the
"ESC-minus" sequence for editing the last executed command.

but there's another bug/feature: "ESC-." (period).
when i (of course by mistake) hit this "feature",
all commands in the history IMMEDIATELY get executed
without even pressing enter.

is this a bug or a feature and how can i avoid this
to happen - even with being in vi mode and in /bin/sh.

from my point of view, this is a really dangerous thing,
because commands like rm -rf or kill could easily get
executed when they shouldn't!

the documentation for vi shows that "." should be used
to edit the whole history and not to parse and execute it!
(allocated to cmdline editing).

cu / regards

ps: just reply to the list, i'm on it.



More information about the freebsd-questions mailing list