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

Re: search through alternative HISTFILE



Just for the record. I figured out that it is necessary to reset HISTNO to its old value after the search on accumulated history is done (otherwise the normal search will be confused):

function accumulated-history-incremental-search-backward () {
    fc -p $ACC_HISTFILE
    HISTNO=$(( $( wc -l < $ACC_HISTFILE ) + 1 ))
    zle history-incremental-search-backward
    fc -P
    HISTNO=$(( $( wc -l < $HISTFILE ) + 1 ))
}

Maarten



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