When the prompt module is activated, the last line of a text output is not displayed if it does not end with a newline.
> echo -n test
test
>
> echo -n test
>
prompt module in your .zpreztorcecho -n testSomebody here seems to have an idea of what is going on but since I am very new to zsh, I don鈥檛 understand what it is about.
I can confirm that the issue does occur in 5.6.2 (OS choice doesn't matter - tested on Arch, Debian, and OSX 10.13). However, this only appears to affect the default prompts provided by zsh, as well as, agnoster, powerline, and pure. This appears to be an upstream issue as the prompts that are handled directly by prezto (e.g. anything here that isn't a submodule - https://github.com/sorin-ionescu/prezto/tree/master/modules/prompt/functions) work as expected. Have you seen this happen using the default sorin theme?
It's a bit buried in the thread Adrian linked, but this was a change in default behavior for zsh in 5.4.2. You can restore the previous behavior with setopt prompt_sp
See: http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting
Thanks @jeffcox! Not near a computer, so can that just be set in zshrc? Also, should we update prompts to respect the default behaviour or leave as is and make a note that this behaviour exists for those prompts?
@johnpneumann Yeah, I just added it to my zshrc. I think if a prompt assumes the old default it would make sense to set it there, but I don't understand why the zsh maintainers changed this so I can't speak to how good an idea it is.
I use pure as prompt theme & I had to run setopt prompt_sp && setopt prompt_cr to restore the previous behavior.
Most helpful comment
It's a bit buried in the thread Adrian linked, but this was a change in default behavior for zsh in 5.4.2. You can restore the previous behavior with
setopt prompt_spSee: http://zsh.sourceforge.net/Doc/Release/Options.html#Prompting