From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6720 invoked from network); 12 Oct 2008 23:35:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL autolearn=unavailable version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Oct 2008 23:35:35 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 20263 invoked from network); 12 Oct 2008 23:35:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Oct 2008 23:35:21 -0000 Received: (qmail 20525 invoked by alias); 12 Oct 2008 23:35:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25863 Received: (qmail 20499 invoked from network); 12 Oct 2008 23:35:13 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 12 Oct 2008 23:35:13 -0000 Received: from uucp.gnuu.de (unknown [83.246.114.63]) by bifrost.dotsrc.org (Postfix) with ESMTP id E73C980524C0 for ; Mon, 13 Oct 2008 01:35:09 +0200 (CEST) Received: by uucp.gnuu.de (Postfix, from userid 10) id 0D3764880D8; Mon, 13 Oct 2008 01:35:08 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.5.2 uucp.gnuu.de 0D3764880D8 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1223854509; i=@alea.gnuu.de; bh=kuFYdXw2dMlcwSrrvxyJXewzCO/fgjqKS SXbTsGxSZw=; h=To:From:Subject:Date:Message-ID:Mime-Version: Content-Type:Content-Transfer-Encoding:Sender; b=jUyCOqoHGSOSB4qMR mw+ZIQXyKgjSeoh6nl+C0/iijmmP868LZd6X4CyJvDTDir2J/JxhgLwbDMQ8t5hM+G9 8g2sVikzI+U0dYMl7u8DdsNegyVNs1ZDO/aWqFtDmZF5q/6IoAUPySPhbgLkCguxJwc FghDfIQ+pBB9G6Ob4luw= Received: from news by alea.gnuu.de with local (Exim 4.63) (envelope-from ) id 1Kp8Oq-0006Lx-3P for zsh-workers@sunsite.dk; Sun, 12 Oct 2008 23:22:52 +0200 To: zsh-workers@sunsite.dk Path: not-for-mail From: =?UTF-8?Q?J=C3=B6rg?= Sommer Newsgroups: local.mailinglist.zsh Subject: Remove history entries Date: Sun, 12 Oct 2008 21:22:52 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: alea.gnuu.de 1223846572 24279 192.168.0.5 (12 Oct 2008 21:22:52 GMT) X-Complaints-To: usenet@alea.gnuu.de User-Agent: slrn/0.9.9 (Linux) Sender: news X-Virus-Scanned: ClamAV 0.92.1/8414/Sun Oct 12 05:30:50 2008 on bifrost X-Virus-Status: Clean Hi, is it possible to remove history entries? I would like to remove commands didn't exist, i.e. their exit code is 127, in the precmd function. Is this possible? precmd() { if [[ $? -eq 127 ]] then history drop -1 fi } Bye, Jörg. -- Was man mühelos erreichen kann, ist gewöhnlich nicht der Mühe wert, erreicht zu werden.