Solve zsh cursor positioned at the beginning in zsh history lookup using arrow key for Ubuntu

Zsh under Ubuntu has a strange behaviour. When you have typed some commands and use up arrow key to look back, the cursor is always at the beginning of the line. This can be solved very easily.

Since Ubuntu inherits package from Debian, this bug is from Debian also. Edit your global zshrc file in Ubuntu here: /etc/zsh/zshrc

Remove everything between #ncurses fogyatekos and fi. Save.

Log out and log back in, when you press the up arrow key to do history lookup, the cursor will be placed at the end of line.

Other Linux distribution and Unix operating systems do not have this problem.

If you are using oh-my-zsh, please disable vi-mode.

Reference: http://www.zsh.org/mla/users/2012/msg00071.html

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.