Skip to content
Advertisement

Backspace in zsh fails to work in quite the strange way

I’m on a fresh Virtualbox install of CentOS 6.4.

After installing zsh 5.0.2 from source using ./configure --prefix=/usr && make && make install and setting it as the shell with chsh -s /usr/bin/zsh, everything is good.

Then some time after, after installing python it seems, it starts acting strange.

  1. Happens with PuTTY and iTerm2 over SSH, does not happen on the raw terminal through Virtualbox.
  2. typing something, then erasing it: rather than removing the char and moving the cursor back, the cursor moves forward.
  3. Typing Ctrl+V then Backspace repeatedly prints out this repeating pattern ‘^@?’
  4. Running cat from zsh works fine. Prints out ‘^H’ if I type that, backspaces like normal if I type normal backspace.

Surely someone’s seen this before and knows exactly what the hell it is.

I’m not positive yet, but it seems that installing oh-my-zsh can fix this. But I really want to know what the specific issue is here.

Advertisement

Answer

sigh I knew I solved this before.

It’s too damn easy to forget things.

The solution is to compile and apply the proper terminfo data with tic, as I have a custom config with my terminal clients, xterm-256color-italic, that confuses zsh.

There appear to be other ways to configure this stuff too; I basically just need it to be properly set up so italics work everywhere (including in tmux) so hopefully I can figure out how to do this more portably than I am currently.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement