Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First characters of prompt are repeated after tab autocompletion (FreeBSD) #4632

Closed
jSherz opened this issue Nov 22, 2015 · 17 comments
Closed

Comments

@jSherz
Copy link

jSherz commented Nov 22, 2015

Apologies if this has been posted before - I can't seem to find it in the active issues. I'm experiencing this bug on FreeBSD running the latest oh-my-zsh.

It happens (seemingly at random) after typing a command, pressing space and then using tab to do a completion.

What I get is the following:

➜  ~  cdcd ~/projects/

Pressing enter will correctly perform the command (it's just a visual bug that doesn't affect the text).

Has anyone ever seen this?

➜  ~  zsh --version 
zsh 5.1.1 (amd64-portbld-freebsd10.1)
@apjanke
Copy link
Contributor

apjanke commented Nov 23, 2015

Sounds similar to #4529 or #3932. Could be an issue with the font and terminal not agreeing on the width of characters, or possibly non-printing characters being emitted in the prompt and not properly escaped. Strange that it only happens sometimes, though. Are there particular completion activities that will regularly reproduce it?

Does it happen with other themes?

@jSherz
Copy link
Author

jSherz commented Nov 23, 2015

I'm using Solarized Light currently but will try with some others and see if the problem still occurs. Unfortunately, I've got no idea what causes it but I'll keep an eye out and look back at my history when it comes back.

Thanks!

@apjanke
Copy link
Contributor

apjanke commented Nov 24, 2015

Solarized is a colorscheme (a set of particular color values for your terminal to display for the palette of ANSI colors), not an OMZ theme. The OMZ theme is set by $ZSH_THEME and controls how the prompt is displayed in terms of formatting and contents. Might also be affected by the font you're using. Looks like you're using the robbyrussell theme. That right-pointing arrow in the theme may be a wide character (two character "cells" for a monospaced font), and if the font and terminal don't agree on how wide it is, that could cause display issues.

@jSherz
Copy link
Author

jSherz commented Nov 24, 2015

My mistake! As you pointed out, I'm using robbyrussell. I'll try a different theme over the next few days and see if the problem reappears.

@jSherz
Copy link
Author

jSherz commented Nov 27, 2015

Confirmed it's specific to that theme so I'll investigate why the arrow is displayed incorrectly. Thanks for your help!

@jSherz jSherz closed this as completed Nov 27, 2015
@barhom
Copy link

barhom commented Mar 9, 2016

I'm also having this issue with the 'cloud' theme.
@jSherz did you manage to fix it ?

@xh3b4sd
Copy link

xh3b4sd commented Aug 9, 2016

@barhom I had the same problem and found a solution working for me here: #5157 (comment).

@ajaychk
Copy link

ajaychk commented Jun 19, 2018

same issue with robbyrussell theme

@DSLituiev
Copy link

same issue with powerlevel9k/powerlevel9k scheme

@stephane-archer
Copy link

put export LC_ALL="en_US.UTF-8" at the end of your .zshrc and see if it fixes that.

@tsauvajon
Copy link

put export LC_ALL="en_US.UTF-8" at the end of your .zshrc and see if it fixes that.

I would suggest using export LC_ALL=$LANG if your $LANG is not en_US

@ghost
Copy link

ghost commented Oct 19, 2022

sorry to necropost, but i'm having this same issue, and none of the listed solutions worked (including the one on the faq).
locale:

image

@mcornella
Copy link
Member

Make sure you have installed that locale, it should appear in locale -a.

@ghost
Copy link

ghost commented Oct 23, 2022

Make sure you have installed that locale, it should appear in locale -a.

hey, i think that's the issue, but i can't seem to install the locale!

image

i've tried a ton of things, and in /etc/locale.gen en_US.UTF-8 IS uncommented, so i'm not sure what the issue is! every time i do locale-gen, it works as expected:

image

i'll keep troubleshooting, but if you know any ways i can fix it, please let me know :)

@mcornella
Copy link
Member

Try using en_US.utf8 exactly as it appears in the locale -a output.

export LANG=en_US.utf8

@ghost
Copy link

ghost commented Oct 26, 2022

still happens:

image

@mcornella
Copy link
Member

mcornella commented Nov 7, 2022

What theme are you using?

EDIT: let's follow-up on a new issue, please create one with the a bullet list of your settings and the theme you're using.

@ohmyzsh ohmyzsh locked as resolved and limited conversation to collaborators Nov 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants