From owner-freebsd-questions@FreeBSD.ORG Mon Aug 27 08:19:06 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01D9016A417 for ; Mon, 27 Aug 2007 08:19:06 +0000 (UTC) (envelope-from b.movaqar@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by mx1.freebsd.org (Postfix) with ESMTP id B5D5713C45B for ; Mon, 27 Aug 2007 08:19:05 +0000 (UTC) (envelope-from b.movaqar@gmail.com) Received: by nz-out-0506.google.com with SMTP id l8so962840nzf for ; Mon, 27 Aug 2007 01:19:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IELpgdotlCGtE+CZcRSUZEqpMxpMH5z/lyARSDGYY6uW8utzZqHuCLFFcrBIdjEBsjCa5uRetsUAH3quYuuj3QqdbEP0IqAartDLnrf3teSIeoK/r4N4LYSDCj2zxf56tKdzoLUyLILLVdcSpNHEwjY/kIS6rXedIbOLNZIATSc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lGHz2FbTpos92eP5lCGy21s1S6wjZsWeglxMpUqvKs5Is0AEABYbZXybB9q8l21VjzWTAIgKZnxmjm3jiwDXtlQx6My6+kMahg2zoxCPJ1eRxKX0Ed7TQU648a+D6SEZILKW42lb0q/hD0lsINwaDi1JCDYyliL9vBGKoEuYoLQ= Received: by 10.114.73.1 with SMTP id v1mr1388647waa.1188202743951; Mon, 27 Aug 2007 01:19:03 -0700 (PDT) Received: by 10.114.132.13 with HTTP; Mon, 27 Aug 2007 01:19:03 -0700 (PDT) Message-ID: <6d62f69a0708270119n34c21b9dr6ab5caa287017da2@mail.gmail.com> Date: Mon, 27 Aug 2007 11:49:03 +0330 From: "Bahman M." To: freebsd-questions@freebsd.org In-Reply-To: <000801c7e87d$bb64f420$14b1a8c0@bstandard.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000801c7e87d$bb64f420$14b1a8c0@bstandard.lan> Subject: Re: /bin/sh vi mode command line editing and the period X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2007 08:19:06 -0000 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 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" >