From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20567 invoked from network); 12 Oct 2006 02:47:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Oct 2006 02:47:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 69194 invoked from network); 12 Oct 2006 02:47:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Oct 2006 02:47:28 -0000 Received: (qmail 16427 invoked by alias); 12 Oct 2006 02:47:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10832 Received: (qmail 16417 invoked from network); 12 Oct 2006 02:47:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Oct 2006 02:47:18 -0000 Received: (qmail 67564 invoked from network); 12 Oct 2006 02:47:18 -0000 Received: from p54853868.dip0.t-ipconnect.de (HELO localhost) (84.133.56.104) by a.mx.sunsite.dk with SMTP; 12 Oct 2006 02:47:17 -0000 Received: from localhost ([127.0.0.1]) by localhost with esmtp (Exim 4.62) (envelope-from ) id 1GXqbL-0005z9-Gf for zsh-users@sunsite.dk; Thu, 12 Oct 2006 04:47:16 +0200 Date: Thu, 12 Oct 2006 04:47:15 +0200 (CEST) Message-Id: <20061012.044715.74744338.Meino.Cramer@gmx.de> To: zsh-users@sunsite.dk Subject: Makeing history harmless From: Meino Christian Cramer X-Mailer: Mew version 5.1 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, there are several kind of commands -- mainly things like "rm" -- which may be harmless only in a certain context. The history function of zsh remembers the command but not the contents. Therefore one may look up (for example via ^R) the history and gives a "go" to a command, which he _really_ does not want by accident. Is it possible to write a "something" to filter out certain commands or to modify certain commands before they were copied from the commandline into the history ? Kind regards and keep hacking! mcc