Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Unterminated command truncates history file



Hah, thank you! That's what I get with fiddling with large integers I suppose... Setting to a reasonably lower number seems to have resolved the issue!

On Tue, Jun 8, 2021 at 2:00 PM Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
On Tue, Jun 8, 2021 at 10:42 PM Jonathan Ching <jon48c@xxxxxxxxx> wrote:
>
> It doesn't seem like the issue is resolved by 5.8. Could it be something else?

I can reproduce this:

    % docker run -e TERM -it --rm zshusers/zsh:5.8 zsh
    7a7002248c6a# print 'HISTFILE=~/hist'              >>~/.zshrc
    7a7002248c6a# print 'HISTSIZE=9223372036854775807' >>~/.zshrc
    7a7002248c6a# print 'SAVEHIST=9223372036854775807' >>~/.zshrc
    7a7002248c6a# print 'setopt incappendhistory'      >>~/.zshrc
    7a7002248c6a# exec zsh
    7a7002248c6a# echo 1
    1
    7a7002248c6a# echo 2
    2
    7a7002248c6a# cat ~/hist
    echo 1
    echo 2
    cat ~/hist
    7a7002248c6a# echo "
    dquote>
    7a7002248c6a# cat ~/hist
    echo 1
    cat ~/hist

Replacing 9223372036854775807with mere 1000000000000000000 avoids the issue.



Messages sorted by: Reverse Date, Date, Thread, Author