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

Re: Help fix Zsh shell command prompt error or stranee



On 8/18/23 7:35 PM, Budi wrote:
Why do Zsh shell command prompt err or behave so messy, when user
input the entry with its buffer length is more than the current max
terminal column ?

What I usually see is the case with what -- I think -- you are describing, it is because there are non-printing control characters in the prompt which get counted. Thus ZLE's count of characters on the line doesn't match what is visually on the line. Doing anything that (un)wraps the line at that point is ... at best ... a mess.

Proper use of %{ and %} sequences to keep ZLE from counting the non-printing / control characters helps a lot.



Grant. . . .




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