zsh: fix multiline history saving

This commit is contained in:
Martin Sekera 2020-05-02 23:51:04 +02:00
parent d108a398d4
commit d708d14f76

View file

@ -210,8 +210,8 @@ function precmd() {
# Write the last command if successful, using the history buffered by # Write the last command if successful, using the history buffered by
# zshaddhistory(). # zshaddhistory().
if [[ $? == 0 && -n $LASTHIST && -n $HISTFILE ]] ; then if [[ $? == 0 && -n "$LASTHIST" && -n $HISTFILE ]] ; then
print -sr -- ${=${LASTHIST%%'\n'}} print -sr "${LASTHIST}"
fi fi
# over-prompt tie in # over-prompt tie in