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

On Debian LXC Containers The first characters entered are displayed twice #691

Open
ciddi89 opened this issue Feb 19, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@ciddi89
Copy link

ciddi89 commented Feb 19, 2024

On LXC Containers running Debian there is a curiouse bug. Or maybe I missed a setting? The first two entered characters are displayed twice. On Debian VM and MacOS there is no problem and the plugin is running fine.
I'm using it as zsh plugin

My Debian Version:
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

Here some screenshots:

Bildschirmfoto 2024-02-19 um 21 19 20 Bildschirmfoto 2024-02-19 um 21 19 31 Bildschirmfoto 2024-02-19 um 21 19 39
@ciddi89 ciddi89 added the bug Something isn't working label Feb 19, 2024
@schwanberger
Copy link

schwanberger commented Feb 20, 2024

I'm experiencing the same thing in WSL2 on Windows 11 in both Windows Terminal and Alacritty. Also, I'm using starship.rs as my prompt - also happens with default oh-my-zsh prompt.

I found, that if I my prompt character is either a unicode character or a UTF-8 symbol (like an arrow) then the error happens. When my prompt is a simple > character, then the issue no longer appears. Interestingly, I do not experience this error when I start a vterm from emacs.

Therefore I suspect that the issue stems from the character length ambiguity from the terminal emulator, where sometimes it's larger than 1 for unicode - this is likely what is causing a trip-up for this plugin.

I have no idea about how to fix this and am perfectly happy using a simple > as my prompt character.

@ciddi89
Copy link
Author

ciddi89 commented Feb 20, 2024

Hi @schwanberger thanks for your reply, so I'm not alone with this. And yes, you're right, I tested it and with a normal '>' instead of the arrow it works fine. I'm just wondering why it works on some systems and not on others. Maybe something is missing.

@schwanberger
Copy link

schwanberger commented Mar 10, 2024

Using the default WSL way to get a shell, it turns out it is not a login shell. I concluded that the issue stems from locale issues - which is stated many times when googling the issue.

This also explains why the issue was not present in emacs (vterm) since a login shell was created there.

Perhaps you (@ciddi89)* could check locale stuff and ensure you have an interactive login shell?

*EDIT: Ping author

@ciddi89
Copy link
Author

ciddi89 commented Mar 19, 2024

hmm okay, I'm not really familiar with it so I had to read what it is first. To my understanding it is an interactive login shell.

echo $0 gives me -zsh so the minus means it's a login shell and
echo $- gives me 569JNRXZghiklms and the little i means it's interactive.

So I don't know, maybe I'm wrong and you can help me to find the right way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants