From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16741 invoked from network); 14 Sep 2002 21:23:31 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Sep 2002 21:23:31 -0000 Received: (qmail 16476 invoked by alias); 14 Sep 2002 21:23:14 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5346 Received: (qmail 16465 invoked from network); 14 Sep 2002 21:23:13 -0000 From: "Bart Schaefer" Message-Id: <1020914212240.ZM15353@candle.brasslantern.com> Date: Sat, 14 Sep 2002 21:22:40 +0000 In-Reply-To: <20020911114230.GA345@os> Comments: In reply to GoTaR "Re: History" (Sep 11, 1:42pm) References: <20020910173015.GA25731@os> <15742.18195.265640.747347@paullew-ultra.cisco.com> <20020911053928.GA234@os> <1020911092846.ZM2431@candle.brasslantern.com> <20020911114230.GA345@os> X-Mailer: Z-Mail (5.0.0 30July97) To: GoTaR Subject: Re: History Cc: zsh-users@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 11, 1:42pm, GoTaR wrote: } } So removing from history is possible only by leading space, not by } configurable pattern, is it right? :/ That is correct. There was some discussion several months ago of having a pattern match for history exclusion, but it didn't lead to anything. It is, however, possible to selectively insert into the history commands that would otherwise be ignored. Try something like this: setopt hist_ignore_space alias cd=' builtin cd' function preexec { if [[ "$1" = 'cd '* && "$1" != 'cd "`echo '*'`"' ]] then print -s "$1" # explicitly add it to the history # else it already will be in the history, so do nothing fi } -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net