alacritty: zsh autocompletion is malformed

  • macOS 10.14.3
  • alacritty 0.3.3
  • shell: oh-my-zsh: zsh 5.3 (x86_64-apple-darwin18.0

Expected

when I type cd and then press tab I expect the shell suggestions to be displayed clearly

Screenshot 2019-10-31 at 17 00 51

How it is

before pressing tab:

Screenshot 2019-10-31 at 17 08 00

after:

Screenshot 2019-10-31 at 17 08 07

or:

Screenshot 2019-10-31 at 16 59 55

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

fwiw you should set it in alacritty env section and not in shell.

Nobody asked yet but could you please share both your left and right prompts? zsh have to compute how much cells are the characters take, so it’s maybe (probably) just a simple counting issue that can be easily solved by fixing your prompt. (For example: zsh guesses that one of your fancy Unicode characters take up two cells but in reality Alacritty just need one cell to draw; and when zsh refreshes, it moves cursor to wrong column.)

  • If you use a plugin for your prompt, it’s an issue with the plugin.
  • If you crafted your prompt(s) manually, then you should try using %G and (temporarily) setting ZLE_RPROMPT_INDENT=1 (default).

Did you alter the shell config variable @debris? Please make sure to always spawn login shells.

I am experiencing this issue as well, but it only occurs when the zsh RPROMPT parameter is set.

entire .zshrc contents

RPROMPT=ABC

alacirtty command alacritty --config-file /dev/null

result image

The same .zshrc is handled correctly in urxvt and xterm

  • alacritty 0.3.3
  • zsh 5.7.1
  • X11 in WSL

Edit: Tried to reproduce this on a proper Arch Linux install under wayland and X11 and was unable to. I am not certain that my issue is related to the parent bug or if it is something unique to my WSL setup.

Also please confirm that the default Alacritty config does not have this issue (alacritty --config-file /dev/null).