zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Eric Smith <eric@fruitcom.com>, zsh users <zsh-users@sunsite.auc.dk>
Subject: Re: confused by history
Date: Sun, 14 May 2000 02:37:08 +0000	[thread overview]
Message-ID: <1000514023708.ZM9771@candle.brasslantern.com> (raw)
In-Reply-To: <20000512205850.A8610@fruitcom.com>

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


      parent reply	other threads:[~2000-05-15  6:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-12 18:58 Eric Smith
2000-05-13 19:49 ` Steve Reid
2000-05-15  6:21   ` Bart Schaefer
2000-05-14  2:37 ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000514023708.ZM9771@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=eric@fruitcom.com \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).