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

Re: Very wierd output problems

On Mon, Jul 11, 2005 at 08:14:54AM -0700, Travis Spencer wrote:
> Try this:
> setopt NO_PROMPTCR

Since that suggestion causes screen-update problems when editing after a
line of partial output, I think it is better to point people at the zsh
FAQ (http://zsh.sunsite.dk/FAQ/zshfaq03.html#l40) where they will be
introduced to a much better solution:

function precmd {
    echo -n ${(l:$COLUMNS:::):-}

The only downside of that is that some X terminals include the trailing
white-space when line-selecting something that was output without a

I think we should take this solution and turn it into a zsh option that
is enabled by default for interactive sessions.  Perhaps name it
PRE_PROMPT_SPACES.  Can anyone see a problem with that?  The option will
not succeed at making partial output visible when the terminal does not
allow line-wrapping, so perhaps the code would notice if the current
terminal was not going to benefit from the heuristic and skip outputting
the spaces in such circumstances.


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