From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4090 invoked from network); 17 Jul 2000 01:55:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Jul 2000 01:55:13 -0000 Received: (qmail 12422 invoked by alias); 17 Jul 2000 01:54:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12264 Received: (qmail 12414 invoked from network); 17 Jul 2000 01:54:55 -0000 Date: Sun, 16 Jul 2000 18:54:27 -0700 (PDT) From: Wayne Davison X-Sender: wayne@phong.blorf.net To: Zsh Workers Subject: spaceflag question; remhist() going away Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII There's a variable that gets set in input.c called "spaceflag". It gets set if the first character of the first line is a space. Later on, the history code checks this flag when the HIST_IGNORE_SPACE option is set. Can anyone tell me why the history code doesn't just check if (*chline == ' ') instead of checking spaceflag? I've removed this variable from my local source, and everything appears to be working just fine without it. In a related area, I've dumped the function remhist() in my local source. This function is a constant source of bugs, and I found yet another bug today: if you have HIST_IGNORE_SPACE set along with HIST_NO_STORE, you lose a line of history every time you type " history" (note the leading space). I've been wanting to dump remhist() for some time now due to how it does not properly interact with the INC_APPEND_HIST & SHARE_HISTORY options. My solution is to use string matching of the command line to determine if this is a command that should not be saved. I'm also considering adding a general-purpose environment variable that would allow the user to specify an arbitrary pattern that would cause the current command line not to be stored in the history. I was thinking about calling it $HISTIGNOREMATCH. Comments are welcomed. ..wayne..