zshrc: Reset $REPLY parameter before calling prompt token functions
authorDmitri Vereshchagin <dmitri.vereshchagin@gmail.com>
Sat, 22 Jun 2019 12:09:59 +0000 (15:09 +0300)
committerDmitri Vereshchagin <dmitri.vereshchagin@gmail.com>
Sat, 22 Jun 2019 12:09:59 +0000 (15:09 +0300)
commit03ec73ccb21f701a03ef49167e354386c07ea05a
treec96b1bb8bcd5d9d8a958ee76963d056ad198760d
parentffe57c8786bf71c015d948eff4253089725b9f8e
zshrc: Reset $REPLY parameter before calling prompt token functions

It may be tempting to write a prompt token function like this

    if (( ${+commands[kerl]} )) REPLY=$(kerl prompt '<%s> ')

But if the command does not exist user may be end up with duplicated
tokens in her prompt.  Resetting $REPLY parameter before calling
user-defined functions prevents this problem.
etc/zsh/zshrc