* confused by history @ 2000-05-12 18:58 Eric Smith 2000-05-13 19:49 ` Steve Reid 2000-05-14 2:37 ` Bart Schaefer 0 siblings, 2 replies; 4+ messages in thread From: Eric Smith @ 2000-05-12 18:58 UTC (permalink / raw) To: zsh users I like lots of history as in ... what was that command I typed two years ago mmm... ^-R and its back ;) 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 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: set INC_APPEND_HISTORY set SHARE_HISTORY export HISTFILE=~/.zsh_history export HISTSIZE=10000 export HISTFILESIZE=10000 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 #histverify #setopt hist_ignore_dups \ #extendedhistory \ #histignoredups \ #histverify -- Eric Smith ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: confused by history 2000-05-12 18:58 confused by history Eric Smith @ 2000-05-13 19:49 ` Steve Reid 2000-05-15 6:21 ` Bart Schaefer 2000-05-14 2:37 ` Bart Schaefer 1 sibling, 1 reply; 4+ messages in thread From: Steve Reid @ 2000-05-13 19:49 UTC (permalink / raw) To: Eric Smith; +Cc: zsh users On Fri, May 12, 2000 at 08:58:50PM +0200, Eric Smith wrote: > 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 > and go wc -l $HISTFILE but get no more that 500 or up to 1000 if lucky - > what could be keeping the file small? I've found that when I boot my computer in the morning and start my X session with a few xterms, occasionally all of my zsh'es have an empty history. I'm don't know what's causing it but presumably it has something to do with the zsh'es all getting killed at shutdown. Maybe this is the problem you're seeing. I also get files with names like ".history.1234" congregating in my home directory. They are all either empty or just contain two bytes: "\0\n". Kind of annoying. ZSH_VERSION=3.1.6-dev-19 OSTYPE=freebsd3.2 History stuff from my rc file: HISTSIZE=800 SAVEHIST=500 HISTFILE=~/.history setopt HIST_EXPIRE_DUPS_FIRST setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_SPACE setopt HIST_NO_STORE setopt HIST_SAVE_NO_DUPS setopt HIST_REDUCE_BLANKS setopt SHARE_HISTORY ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: confused by history 2000-05-13 19:49 ` Steve Reid @ 2000-05-15 6:21 ` Bart Schaefer 0 siblings, 0 replies; 4+ messages in thread From: Bart Schaefer @ 2000-05-15 6:21 UTC (permalink / raw) To: Steve Reid; +Cc: zsh users On May 13, 12:49pm, Steve Reid wrote: } Subject: Re: confused by history } } I've found that when I boot my computer in the morning and start my X } session with a few xterms, occasionally all of my zsh'es have an empty } history. I'm don't know what's causing it but presumably it has } something to do with the zsh'es all getting killed at shutdown. } } I also get files with names like ".history.1234" congregating The 1234 in those file names is a process ID. Those are the lock files zsh 3.1.6 (or thereabouts) creates to prevent multiple processes writing to the history at the same time. They get unlinked when writing the history is finished. If you're seeing those files pile up, then you're killing off your shells with some kind of signal before they have a chance to finish shutting down. It sounds like you may actually be running "shutdown" after your X server exits and then powering off the computer? If so, you probably want to put in a bit of a delay so that the processes have more time to finish up before they get killed. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: confused by history 2000-05-12 18:58 confused by history Eric Smith 2000-05-13 19:49 ` Steve Reid @ 2000-05-14 2:37 ` Bart Schaefer 1 sibling, 0 replies; 4+ messages in thread From: Bart Schaefer @ 2000-05-14 2:37 UTC (permalink / raw) To: Eric Smith, zsh users 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-05-15 7:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2000-05-12 18:58 confused by history Eric Smith 2000-05-13 19:49 ` Steve Reid 2000-05-15 6:21 ` Bart Schaefer 2000-05-14 2:37 ` Bart Schaefer
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).