Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

prompt and prompt_cr option



Hello,

I have run into the problem several times of having lines of output in the shell that don't have a newline and having the prompt overwrite them. I did find the `setopt nopromptcr` solution but I also like having multiline editing always work correctly. I thought that I would try and solve both problems with the following:

setopt nopromptcr
prompt='%(1l,\n,)%! %n@%m %0~ > '

but that didn't seem to do the trick. Is there a way to force zsh to check to see if the last character that was printed was a newline and if it wasn't to just print one before it issues the carriage return?

Jordan


Messages sorted by: Reverse Date, Date, Thread, Author