Solved Error message after sudden reboot at zsh prompt

For the first time, every zsh command puts out a
"Error: near line ...: in prepare, near "select": syntax error (1)"
and I am at a loss from which program or function in .zshrc it derives so I can
begin a fix, then the command completes as usual. Just the spurious line is
annoying. [ the line number varies each time ]
 
For the first time, every zsh command puts out a
"Error: near line ...: in prepare, near "select": syntax error (1)"
and I am at a loss from which program or function in .zshrc it derives so I can
begin a fix, then the command completes as usual.
Don't use zsh but my first guess would be the prompt settings. Something in the prompt causes this error to be printed.
 
Investigated more and the the history file count, usually 90000, now is only 4000 and increasing even after restoring a larger, whole history file from daily backup. So something is impeding its parsing, I suspect.
 
The error message is maybe more complete now:
[ at least one instance]:
[ more than one error process? ]
...
Error: stepping, database image is malformed (11)
History database /root/.histdb/zsh-history.db is using an older schema () and
will be updated to version 2.
There is no migration script from version to 2.
Error: in prepare, database disk image is malformed (11)
 
Ah, so it's croaking because your history database uses an old schema. I'm sure there's documentation on how to update it.
 
SirDice considering this output:
History database /root/.histdb/zsh-history.db is using an older schema () and
will be updated to version 2.
There is no migration script from version to 2.
which seems to miss the old version (empty string), it looks more like a bogus message following a b0rked file, damaged by the sudden reboot.

I'd just delete it ...
 
Found the two lines in .zshrc. So solved for now...
# source /root/.oh-my-zsh/custom/plugins/zsh-histdb/sqlite-history.zsh
# add-zsh-hook precmd histdb-update-outcome
... or at least the error message went minimalistic.
....
thanks everyone for the replies.
Marking thread as solved.
Also, the history count I got back upto 90000 or so, double success.
 
Back
Top