From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 650 invoked from network); 14 Sep 2001 00:53:27 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Sep 2001 00:53:27 -0000 Received: (qmail 6100 invoked by alias); 14 Sep 2001 00:53:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15807 Received: (qmail 6082 invoked from network); 14 Sep 2001 00:53:18 -0000 Date: Thu, 13 Sep 2001 17:52:49 -0700 (PDT) From: Wayne Davison X-X-Sender: To: Zsh Workers Subject: Re: r problem In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 13 Sep 2001, Wayne Davison wrote: > With the advent of my HIST_TMPSTORE flag, I could change the builtins > to set this value and get rid of the command-line scan. I'll look > into this later to see if I think this is a good idea. It's not. That would be too much like what we used to have, and the side-effects of dumping a history entry from inside a builtin function are not something that I want to revisit. So, we currently have the problem that I can define a function named "r" and with HIST_NO_STORE set, invoking that function from the command-line drops the command from the history. One potential solution to this would be to change the history-line-drop code to lookup "r" in a function list and avoid dropping "r" (but not "builtin r") if we find it. I don't know the function code well enough to know if there is an inexpensive call that should_ignore_line() could call for this or not. Another solution is to leave things alone and let people use an alias to redefine "r". Like this: function r_func { echo foo } alias r=r_func That's not as nice, but it works. Comments? ..wayne..