From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16774 invoked from network); 11 May 1999 15:39:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 May 1999 15:39:04 -0000 Received: (qmail 16132 invoked by alias); 11 May 1999 15:38:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6263 Received: (qmail 16125 invoked from network); 11 May 1999 15:38:53 -0000 Message-Id: <9905111514.AA32529@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: pws-18: incappendhistory Date: Tue, 11 May 1999 17:14:32 +0200 From: Peter Stephenson This, with Wayne's permission, turns `incrementalappendhistory' into `incappendhistory'. --- Doc/Zsh/options.yo.iah2 Tue May 11 11:20:52 1999 +++ Doc/Zsh/options.yo Tue May 11 17:08:45 1999 @@ -479,9 +479,9 @@ However, ten consecutive EOFs will cause the shell to exit anyway, to avoid the shell hanging if its tty goes away. ) -pindex(INCREMENTAL_APPEND_HISTORY) +pindex(INC_APPEND_HISTORY) cindex(history, incremental appending to a file) -item(tt(INCREMENTAL_APPEND_HISTORY))( +item(tt(INC_APPEND_HISTORY))( This options works like APPEND_HISTORY except that new history lines are added to the tt($HISTFILE) when they finish running, rather than waiting until the shell is killed. The file is periodically trimmed --- Src/hist.c.iah2 Tue May 11 16:52:02 1999 +++ Src/hist.c Tue May 11 16:52:22 1999 @@ -972,7 +972,7 @@ zfree(chwords, chwordlen*sizeof(short)); chline = NULL; histactive = 0; - if (isset(SHAREHISTORY) || isset(INCREMENTALAPPENDHISTORY)) + if (isset(SHAREHISTORY) || isset(INCAPPENDHISTORY)) savehistfile(hf, 1, HFILE_USE_OPTIONS | HFILE_FAST); unlockhistfile(hf); /* It's OK to call this even if we aren't locked */ return !(flag & HISTFLAG_NOEXEC || errflag); @@ -1778,7 +1778,7 @@ he = hist_ring->down; } if (writeflags & HFILE_USE_OPTIONS) { - if (isset(APPENDHISTORY) || isset(INCREMENTALAPPENDHISTORY) + if (isset(APPENDHISTORY) || isset(INCAPPENDHISTORY) || isset(SHAREHISTORY)) writeflags |= HFILE_APPEND | HFILE_SKIPOLD; else --- Src/options.c.iah2 Tue May 11 16:51:21 1999 +++ Src/options.c Tue May 11 17:05:48 1999 @@ -73,6 +73,10 @@ #define defset(X) (!!((X)->flags & emulation)) +/* + * Note that option names should usually be fewer than 20 characters long + * to avoid formatting problems. + */ static struct optname optns[] = { {NULL, "allexport", 0, ALLEXPORT}, {NULL, "alwayslastprompt", OPT_ALL, ALWAYSLASTPROMPT}, @@ -137,7 +141,7 @@ {NULL, "hup", OPT_EMULATE|OPT_ZSH, HUP}, {NULL, "ignorebraces", OPT_EMULATE|OPT_SH, IGNOREBRACES}, {NULL, "ignoreeof", 0, IGNOREEOF}, -{NULL, "incrementalappendhistory",0, INCREMENTALAPPENDHISTORY}, +{NULL, "incappendhistory", 0, INCAPPENDHISTORY}, {NULL, "interactive", OPT_SPECIAL, INTERACTIVE}, {NULL, "interactivecomments", OPT_EMULATE|OPT_BOURNE, INTERACTIVECOMMENTS}, {NULL, "ksharrays", OPT_EMULATE|OPT_BOURNE, KSHARRAYS}, --- Src/zsh.h.iah2 Tue May 11 14:54:58 1999 +++ Src/zsh.h Tue May 11 16:51:26 1999 @@ -1155,7 +1155,7 @@ HUP, IGNOREBRACES, IGNOREEOF, - INCREMENTALAPPENDHISTORY, + INCAPPENDHISTORY, INTERACTIVE, INTERACTIVECOMMENTS, KSHARRAYS, -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy