Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text disappears when typing long commands in zsh on OSX?

When I'm typing a command longer than around 20 characters the text disappears and the cursor moves to a different location in the terminal. How do I stop this? I find it difficult to understand what I'm doing when this happens.

like image 284
Michael Barton Avatar asked Nov 12 '09 15:11

Michael Barton


2 Answers

Your $PROMPT may have escape sequences in it that should be wrapped in %{...%} to keep them from being counted when zsh calculates the length of the displayed prompt.

like image 56
Dennis Williamson Avatar answered Oct 12 '22 04:10

Dennis Williamson


There could be an incorrect TERM type, resulting in incorrect cursor positioning. For OS X Terminal.app, this term type works well for most curses-based apps:

$ echo $TERM
xterm-color

It should also work well in xterm.

like image 30
Ned Deily Avatar answered Oct 12 '22 05:10

Ned Deily