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