Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2007 11:49:03 +0330
From:      "Bahman M." <b.movaqar@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: /bin/sh vi mode command line editing and the period
Message-ID:  <6d62f69a0708270119n34c21b9dr6ab5caa287017da2@mail.gmail.com>
In-Reply-To: <000801c7e87d$bb64f420$14b1a8c0@bstandard.lan>
References:  <000801c7e87d$bb64f420$14b1a8c0@bstandard.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
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@spam@mgedv.net <nospam@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6d62f69a0708270119n34c21b9dr6ab5caa287017da2>