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

Prompt not working via ssh #153

Closed
fheusel opened this issue Aug 5, 2019 · 2 comments
Closed

Prompt not working via ssh #153

fheusel opened this issue Aug 5, 2019 · 2 comments

Comments

@fheusel
Copy link

fheusel commented Aug 5, 2019

Hi, I'm using powerlevel10k with oh-my-zsh on macOS 10.14.6 (zsh is version 5.7.1 from brew) with the MesloLGS NF font from your dotfiles-repo.
When connecting via ssh the prompt won't be rendered correctly and I get this error: _p9k_get_icon:13: character not in range
screenshot

@romkatv
Copy link
Owner

romkatv commented Aug 5, 2019

The problem is that the locale in your SSH session isn't using utf-8 encoding. If you try to print a non-ascii character with print '\u2B50' or echo $'\u2B50', you'll get "character not in range" error. It's not affecting just p10k but everything you run in the SSH session. To fix this problem you need to run locale -a, pick a locale that has utf8, utf-8 or UTF8 or UTF-8 in its name, and export LANG from your ~/.zshrc or ~/.zshenv with the value set to the chosen locale.

For example:

echo 'export LANG=C.UTF-8' >>! ~/.zshenv

Or:

echo 'export LANG=en_US.UTF-8' >>! ~/.zshenv

@fheusel
Copy link
Author

fheusel commented Aug 5, 2019

Thank you very much for your quick and helpful response. I was not aware that my locale settings are not in effect in the SSH session.

@fheusel fheusel closed this as completed Aug 5, 2019
tylerbodway added a commit to tylerbodway/dotfiles that referenced this issue Jul 22, 2024
This fixes an issue with the p10k prompt theme I was using saying a
character was not in range as it uses unicode characters. This was only
happening over SSH.

romkatv/powerlevel10k#153 (comment)
tylerbodway added a commit to tylerbodway/dotfiles that referenced this issue Jul 22, 2024
This fixes an issue with the p10k prompt theme I was using saying a
character was not in range as it uses unicode characters. This was only
happening over SSH.

romkatv/powerlevel10k#153 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants