-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Cursor in the wrong location in Docker #1555
Comments
I had the same issue on various machines with and sometimes without ssh. try locale if something only says "C" thats the problem I fixed it with following lines in .zprofile # fixes strange cursor position / formating bug
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8 |
My locale is set to |
On the ubuntu docker images page it says "Given that it is a minimal install of Ubuntu, this image only includes the C, C.UTF-8, and POSIX locales by default. For most uses requiring a UTF-8 locale, C.UTF-8 is likely sufficient (-e LANG=C.UTF-8 or ENV LANG C.UTF-8)." For me, setting LANG=C.UTF-8 fixed the issue with the |
Thanks for the updates everyone! It looks like this issue is related to using a non-unicode locale with unicode in the prompt. There isn't a ton we can do about this on the prezto side, so the best fix is setting your locale to one that's unicode compatible. EDIT: Specifically, if I had to guess, it would be related to wide unicode characters |
This issue bit my again, but under a different circumstance. This bug started occurring when ssh'ing into a remote Linux machine, and it had been working reliably the day before. I wasn't what had changed. I turns out that I changed the locale of my macOS laptop from 🇺🇸 to 🇨🇦. That caused my locale on the remote Linux machine to change from |
Description
The cursor is in the wrong location after a command exits with a non-zero status. The cursor is on top of the third chevron of the default prompt
~ # ❯❯❯
. I see this issue when I use Prezto in the Docker imageubuntu:xenial
on macOS. It works as expected when I use it on macOS without Docker being involved.Expected behavior
After an unsuccessful command, the cursor would be two characters after the last chevron.
Actual behavior
After an unsuccessful command, the cursor is directly on top of the last chevron. The next character that I type replaces the last chevron.
Steps to Reproduce
Versions
The text was updated successfully, but these errors were encountered: