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

Lines ending with two backslashes are incorrectly read from history file



Hi everyone,

I noticed a problem reading history files that contain lines ending in two consecutive backslashes (\\).

    % zsh -f
    % SAVEHIST=10
    % bindkey -p \\
    % fc -W history
    % fc -IR history
    [up-arrow]
    % bindkey -p \
    fc -W history

The backslash preceding the \n seems to be interpreted as line continuation here even though it's escaped itself?

    % fc -l
        1  SAVEHIST=10
        2  bindkey -p \\
        3  fc -W history
        4  fc -IR history
        5  bindkey -p \\nfc -W history

I've tested this with: -
4.3.11            on Linux 3.0.0-16-server #29-Ubuntu
4.3.12 and 4.3.17 on CYGWIN_NT-6.1-WOW64 1.7.13(0.260/5/3)
4.3.15            on NetBSD 4.0.1_PATCH

Hope I haven't missed a prior report, I searched the archives but haven't found anything about this.



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