From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13350 invoked from network); 15 May 2000 06:02:26 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 May 2000 06:02:26 -0000 Received: (qmail 16674 invoked by alias); 15 May 2000 06:01:58 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3061 Received: (qmail 16666 invoked from network); 15 May 2000 06:01:54 -0000 From: "Bart Schaefer" Message-Id: <1000514023708.ZM9771@candle.brasslantern.com> Date: Sun, 14 May 2000 02:37:08 +0000 In-Reply-To: <20000512205850.A8610@fruitcom.com> Comments: In reply to Eric Smith "confused by history" (May 12, 8:58pm) References: <20000512205850.A8610@fruitcom.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Eric Smith , zsh users Subject: Re: confused by history MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 12, 8:58pm, Eric Smith wrote: } Subject: confused by history } } Problem is that I cannot seem to grow my history file - as you can see by } the grep -i from my zshrc I am quite ambitous. I often toggle setting What do you mean by "toggle setting" here? } and go wc -l $HISTFILE but get no more that 500 or up to 1000 if lucky - } what could be keeping the file small? } } grep -i /etc/zshrc: Is all this stuff really in /etc/zshrc? Why isn't it in ~/.zshrc instead? What IS in ~/.zshrc? Anything in ~/.zshrc is run after /etc/zshrc, so if you have e.g. HISTSIZE=500 there, the setting in /etc/zshrc won't matter. What about /etc/zlogin and ~/.zlogin, which are run even later? Have you looked at the output of `print $HISTSIZE $SAVEHIST' to see whether the variables are really set to what you expect? } set INC_APPEND_HISTORY } set SHARE_HISTORY Those should be setopt, not set, but the first one gets a setopt below. } export HISTFILE=~/.zsh_history } export HISTSIZE=10000 } export HISTFILESIZE=10000 There's no such thing as HISTFILESIZE, at least in zsh. Bash, maybe? Yeah, that seems to be it. How'd that sneak into /etc/zshrc? } export SAVEHIST=10000 } setopt } append_history \ } bang_hist \ } hist_allow_clobber \ } hist_expire_dups_first \ } hist_ignore_all_dups \ } histignoredups \ } inc_append_history \ } hist_ignore_dups \ } extendedhistory The doc for inc_append_history says: INC_APPEND_HISTORY This options works like APPEND_HISTORY except that new history lines are added to the $HISTFILE incrementally (as soon as they are entered), rather than waiting until the shell is killed. The file is periodically trimmed to the number of lines specified by $SAVEHIST, but can exceed this value between trimmings. So my guess is that somewhere you have a SAVEHIST=500 which is causing inc_append history to periodically trim the file. If you happen to look at it between trimmings, it'll be bigger, hence "up to 1000 if lucky." -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com