From d708d14f768b0467be1fe99b9245cb54ad701b94 Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Sat, 2 May 2020 23:51:04 +0200 Subject: [PATCH] zsh: fix multiline history saving --- etc/zsh/zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1bf6c2d..df33651 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -210,8 +210,8 @@ function precmd() { # Write the last command if successful, using the history buffered by # zshaddhistory(). - if [[ $? == 0 && -n $LASTHIST && -n $HISTFILE ]] ; then - print -sr -- ${=${LASTHIST%%'\n'}} + if [[ $? == 0 && -n "$LASTHIST" && -n $HISTFILE ]] ; then + print -sr "${LASTHIST}" fi # over-prompt tie in