From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20545 invoked by alias); 25 Aug 2010 21:12:15 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15332 Received: (qmail 18298 invoked from network); 25 Aug 2010 21:12:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Wed, 25 Aug 2010 17:11:47 -0400 (EDT) From: "Benjamin R. Haskell" To: Mikael Magnusson cc: zsh-users@zsh.org Subject: Re: do not write certain commands to history file In-Reply-To: Message-ID: References: <20100825192608.GG11622@trustfood.org> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 25 Aug 2010, Mikael Magnusson wrote: > On 25 August 2010 22:55, Benjamin R. Haskell wrote: > > On Wed, 25 Aug 2010, Eric Smith wrote: > > > >> [...] > >> > >> zshaddhistory() { > >> [...trimmed...] > >> > >> [[ [...trimmed...] > >> && ${arg} != (*foobar*) > >> ]] > >> } > > > > Where are you setting $arg? Do you mean $line? or are you trying to > > match *foobar* in $argv? > > What are you talking about? See the portion of his original function I left above. > There's no $arg anywhere, and no arrays. zshaddhistory() is passed > the entire command line in a single argument. Which is accessible via ${argv}, I suppose. But, yeah, overkill. I was thinking of finding *foobar* in a general function's $argv. -- Best, Ben