* history trouble @ 2006-01-28 7:41 Thomas Richter 2006-01-28 15:53 ` Bart Schaefer 0 siblings, 1 reply; 8+ messages in thread From: Thomas Richter @ 2006-01-28 7:41 UTC (permalink / raw) To: list zsh-users Hi, I have a problem with zsh 4.2.6 (i686-pc-cygwin). My history isn't read and write. I have the permission: $ ls -l ~/.zsh_history -rw-r--r-- 1 richter Kein 7 Jan 26 14:56 /home/richter/.zsh_history I have set all correct: $ cat ~/.zshrc HISTSIZE=99999 HISTFILE=~/.zsh_history SAVEHIST=9999 They are read: $ set | col -bx | grep HIST | sort APPEND_HISTORY=1 HISTCHARS='!^#' HISTCMD=5 HISTCONTROL=ignoreboth HISTFILE=/home/richter/.zsh_history HISTFILESIZE=999999 HISTIGNORE='[ ]*:&:bg:fg:exit' HISTSIZE=99999 SAVEHIST=9999 The other are from bash where I exportet the variables. The options look ok for me: $ setopt extendedglob histexpiredupsfirst histignoredups interactive monitor promptsubst pushdsilent shinstdin zle I can write to the history with setopt inc_append_history but I want the file read! wkr Thomas Richter -- dss1://49.431.801306 Wot're we going to do tonight, Brain ? gsm://49.179.5192431 The same thing we do every night, Pinky . icq://124849926 Try to TAKE OVER THE WORLD ! mailto:richter@thomas-richter.de http://www.thomas-richter.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-01-28 7:41 history trouble Thomas Richter @ 2006-01-28 15:53 ` Bart Schaefer 2006-01-28 19:04 ` Thomas Richter 0 siblings, 1 reply; 8+ messages in thread From: Bart Schaefer @ 2006-01-28 15:53 UTC (permalink / raw) To: list zsh-users On Jan 28, 8:41am, Thomas Richter wrote: } } The options look ok for me: I don't see "login". Only login shells read the history automatically. } $ setopt } extendedglob } histexpiredupsfirst } histignoredups } interactive } monitor } promptsubst } pushdsilent } shinstdin } zle (By the way: 'honk'. Based on all the extra cruft in your message header, you're not too concerned about whether your mail goes into most people's spam filters. And what is your X-Face meant to look like?) ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-01-28 15:53 ` Bart Schaefer @ 2006-01-28 19:04 ` Thomas Richter 2006-01-28 20:32 ` Bart Schaefer 0 siblings, 1 reply; 8+ messages in thread From: Thomas Richter @ 2006-01-28 19:04 UTC (permalink / raw) To: list zsh-users Hi Bart Schaefer <schaefer@brasslantern.com>, you wrote on Saturday, 2006-01-28 15:53:51 +0000: > On Jan 28, 8:41am, Thomas Richter wrote: > } > } The options look ok for me: > > I don't see "login". Only login shells read the history automatically. On my other computer (zsh 4.1.1 (i386-suse-linux)) there also no login set - but it read my history ... wkr Thomas Richter -- dss1://49.431.801306 Wot're we going to do tonight, Brain ? gsm://49.179.5192431 The same thing we do every night, Pinky . icq://124849926 Try to TAKE OVER THE WORLD ! mailto:richter@thomas-richter.de http://www.thomas-richter.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-01-28 19:04 ` Thomas Richter @ 2006-01-28 20:32 ` Bart Schaefer 2006-01-29 16:29 ` Thomas Richter 0 siblings, 1 reply; 8+ messages in thread From: Bart Schaefer @ 2006-01-28 20:32 UTC (permalink / raw) To: list zsh-users On Jan 28, 8:04pm, Thomas Richter wrote: } Subject: Re: history trouble } } Hi Bart Schaefer <schaefer@brasslantern.com>, } you wrote on Saturday, 2006-01-28 15:53:51 +0000: } > On Jan 28, 8:41am, Thomas Richter wrote: } > } } > } The options look ok for me: } > } > I don't see "login". Only login shells read the history automatically. } } On my other computer (zsh 4.1.1 (i386-suse-linux)) there also no } login set - but it read my history ... Sorry, I'm being dense this morning. I forgot that it's my own setup that skips history settings for non-login shells. Possible reasons for the history not to be read are: - the NO_RCS option is set (the doc says this prevents history from being written, but it also suppresses reading it) - the INTERACT option is not set - lockhistfile() fails because + a temporary lock file can't be created in the same directory as the HISTFILE + a link to that temp file can't be created + something else [possibly several somethings] has the file locked for more than about 10 seconds (but this shouldn't apply at shell startup, only for incremental history) - the file can't be opened for reading - some part of the file is corrupt - HISTSIZE is zero (in which case, I believe, the file is read but all the contents are discarded) My (new, ahem) guess is that the problem is with the lock file. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-01-28 20:32 ` Bart Schaefer @ 2006-01-29 16:29 ` Thomas Richter 2006-02-01 0:04 ` Peter A. Castro 0 siblings, 1 reply; 8+ messages in thread From: Thomas Richter @ 2006-01-29 16:29 UTC (permalink / raw) To: list zsh-users Hi Bart Schaefer <schaefer@brasslantern.com>, you wrote on Saturday, 2006-01-28 20:32:36 +0000: > On Jan 28, 8:04pm, Thomas Richter wrote: > > Possible reasons for the history not to be read are: > > - the NO_RCS option is set (the doc says this prevents history from > being written, but it also suppresses reading it) This option is not set. > - the INTERACT option is not set This option is set. > - lockhistfile() fails because > + a temporary lock file can't be created in the same directory > as the HISTFILE How can I test this? > + a link to that temp file can't be created ln -s $HISTFILE newname is ok > + something else [possibly several somethings] has the file locked > for more than about 10 seconds (but this shouldn't apply at shell > startup, only for incremental history) no process has this file open > - the file can't be opened for reading cat $HISTFILE is ok > - some part of the file is corrupt no contains only one line with one word > - HISTSIZE is zero (in which case, I believe, the file is read but all > the contents are discarded) HISTSIZE = 99999 > My (new, ahem) guess is that the problem is with the lock file. wkr Thomas Richter -- dss1://49.431.801306 Wot're we going to do tonight, Brain ? gsm://49.179.5192431 The same thing we do every night, Pinky . icq://124849926 Try to TAKE OVER THE WORLD ! mailto:richter@thomas-richter.de http://www.thomas-richter.de ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-01-29 16:29 ` Thomas Richter @ 2006-02-01 0:04 ` Peter A. Castro 2006-02-01 2:10 ` Frank Terbeck 0 siblings, 1 reply; 8+ messages in thread From: Peter A. Castro @ 2006-02-01 0:04 UTC (permalink / raw) To: Thomas Richter; +Cc: list zsh-users On Sun, 29 Jan 2006, Thomas Richter wrote: Greetings, Thomas, Can you verify something: Start a shell, enter a few commands, exit the shell, then look at the history file and see if your commands were added to it? If so, then it's not a matter of your commands not being written to history, but that they are being buffered and, upon exit, flushed to file. Try this: setopt inc_append_history > Hi Bart Schaefer <schaefer@brasslantern.com>, > you wrote on Saturday, 2006-01-28 20:32:36 +0000: >> On Jan 28, 8:04pm, Thomas Richter wrote: >> >> Possible reasons for the history not to be read are: >> >> - the NO_RCS option is set (the doc says this prevents history from >> being written, but it also suppresses reading it) > > This option is not set. > >> - the INTERACT option is not set > > This option is set. > >> - lockhistfile() fails because >> + a temporary lock file can't be created in the same directory >> as the HISTFILE > > How can I test this? > >> + a link to that temp file can't be created > > ln -s $HISTFILE newname is ok > >> + something else [possibly several somethings] has the file locked >> for more than about 10 seconds (but this shouldn't apply at shell >> startup, only for incremental history) > > no process has this file open > >> - the file can't be opened for reading > > cat $HISTFILE is ok > >> - some part of the file is corrupt > > no contains only one line with one word > >> - HISTSIZE is zero (in which case, I believe, the file is read but all >> the contents are discarded) > > HISTSIZE = 99999 > >> My (new, ahem) guess is that the problem is with the lock file. > > wkr Thomas Richter -- Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com> "Cats are just autistic Dogs" -- Dr. Tony Attwood ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-02-01 0:04 ` Peter A. Castro @ 2006-02-01 2:10 ` Frank Terbeck 2006-02-01 18:20 ` Peter A. Castro 0 siblings, 1 reply; 8+ messages in thread From: Frank Terbeck @ 2006-02-01 2:10 UTC (permalink / raw) To: list zsh-users Peter A. Castro <doctor@fruitbat.org> wrote: > On Sun, 29 Jan 2006, Thomas Richter wrote: > > Greetings, Thomas, > Can you verify something: > Start a shell, enter a few commands, exit the shell, then look at the > history file and see if your commands were added to it? If so, then > it's not a matter of your commands not being written to history, but that > they are being buffered and, upon exit, flushed to file. > > Try this: > setopt inc_append_history >From Thomas' original posting: > I can write to the history with > setopt inc_append_history > but I want the file read! Regards, Frank ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: history trouble 2006-02-01 2:10 ` Frank Terbeck @ 2006-02-01 18:20 ` Peter A. Castro 0 siblings, 0 replies; 8+ messages in thread From: Peter A. Castro @ 2006-02-01 18:20 UTC (permalink / raw) To: list zsh-users On Wed, 1 Feb 2006, Frank Terbeck wrote: > Peter A. Castro <doctor@fruitbat.org> wrote: >> On Sun, 29 Jan 2006, Thomas Richter wrote: >> >> Greetings, Thomas, >> Can you verify something: >> Start a shell, enter a few commands, exit the shell, then look at the >> history file and see if your commands were added to it? If so, then >> it's not a matter of your commands not being written to history, but that >> they are being buffered and, upon exit, flushed to file. >> >> Try this: >> setopt inc_append_history > >> From Thomas' original posting: > >> I can write to the history with >> setopt inc_append_history >> but I want the file read! Yes, I did see that, however, I wanted to make sure that this option was really set and that history was been appended to. Because, if that is the case, then the history file can certainly be accessed (and read from). I guess I don't quite understand the problem. When you (Thomas) say you can't read history do you mean you can't do any history functions? Like, with zle loaded, scroll through interactive history? At all? So, if you start a fresh shell session (with zsh -l -i), you can't retrieve any previous commands? If you enter a few commands, can you retrieve them or not? Can you 'echo $history'? I must say that HISTSIZE (and SAVEHIST) are ridiculously large (99999 and 9999). Setting these to something smaller might be worth a try. Do you have anything special in any of the /etc/z* files? Lastly, what if you start zsh from a dos prompt instead of from a bash shell? > Regards, Frank -- Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com> "Cats are just autistic Dogs" -- Dr. Tony Attwood ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-02-01 22:08 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-01-28 7:41 history trouble Thomas Richter 2006-01-28 15:53 ` Bart Schaefer 2006-01-28 19:04 ` Thomas Richter 2006-01-28 20:32 ` Bart Schaefer 2006-01-29 16:29 ` Thomas Richter 2006-02-01 0:04 ` Peter A. Castro 2006-02-01 2:10 ` Frank Terbeck 2006-02-01 18:20 ` Peter A. Castro
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).