#10658·ohmyzsh

Oh My Zsh should fix or warn about non-UTF8 locales

Author: davidstosikCreated Feb 5, 2022Updated Sep 29, 2026
LabelsBugArea: coreTopic: completion

Describe the bug

This is a bug for which I have found a lot of reports for a long time, but nothing has helped me solve it so far.

Using out-of-the-box Oh My Zsh, autocompletion glitches and duplicates characters at the prompt.

Steps to reproduce

Here's a Dockerfile that will allow you to reproduce it in an environment that is clean of any past configuration:

dockerfile
FROM ubuntu:latest
RUN apt-get update && apt-get install -y curl git zsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
ENTRYPOINT zsh

To build and run:

bash
docker build . --progress=plain -t omz
docker run -it --rm omz

Once you're in, type ls then press Tab. If the bug happened you should end up with lsls displayed on your prompt., but you can only delete the second one.

Note that although I am testing in the Ubuntu Docker image, my host OS is macOS and I use the Terminal application.

Expected behavior

The glitch should not happen (in the example above, ls should not be displayed twice).

Screenshots and recordings

https://user-images.githubusercontent.com/816901/152645367-5b23597d-4110-4dbe-b9f8-fee809e01aec.mov

OS / Linux distribution

Ubuntu? macOS?

Zsh version

5.8

Oh My Zsh version

master (2d3bae96)

Terminal emulator

Terminal.app

If using WSL on Windows, which version of WSL

No response

Additional context

No response