Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zsh + tmux + oh-my-zsh: Autocomplete produces remnant characters

I recently installed Zsh in hope of a better life and brighter mornings. However, I quickly realized Zsh introduces various issues in conjunction with tmux.

The first issue was some weird stuff happening at the end of the prompt, before my commands, but this was resolved by supplying tmux with the -u flag for unicode-support. However, I am stuck with one final issue that needs resolution before I can use Zsh with tmux:

Usecase: Autocomplete a command which contains multiple suggestions
Issue: Autocompletion shifts suggestion one character to the right, while leaving the original character behind (visual bug, it is not included in the command)

Example 1.

Ex. 1
Then I hit TAB..
Ex. 2


Example 2.

Ex. 3
Then I hit TAB..
Ex. 4

Note 1: This does NOT occur when using the Bash-shell.
Note 2: I am using "oh-my-zsh". This issue only occurs when using the provided themes. This narrows it down to an "oh-my-zsh"-theme issue, not native zsh/tmux.

like image 648
krystah Avatar asked Oct 20 '13 16:10

krystah


1 Answers

In case some people still get a similar issue, see also the top-voted answer of Remnant characters when tab completing with ZSH. The plugin you were using may have had the same non-printable characters issue, that would explain the symptoms.

like image 116
Jean Avatar answered Oct 18 '22 12:10

Jean