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

Bahman M. b.movaqar at gmail.com
Mon Aug 27 01:19:06 PDT 2007


As far as I know, ESC-. (in fact hitting '.' when in command mode)
repeats your very last action whether it was an editing action or
executing a command.

Bahman

On 8/27/07, no at spam@mgedv.net <nospam at mgedv.net> wrote:
> 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.
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>


More information about the freebsd-questions mailing list