Bash-it / bash-it

A community Bash framework.
MIT License
14.31k stars 2.29k forks source link

bash: warning: setlocale: LC_ALL: cannot change locale (en_uS.UTF-8): No such file or directory #2206

Closed sudoharun closed 1 week ago

sudoharun commented 1 year ago

Either I'm dumb or something because I can't figure out how to get rid of this error. bruh

On the main page under themes it says this:

NOTE: Bash-it and some themes use UTF-8 characters, so to avoid strange behavior in your terminal, set your locale to LC_ALL=en_US.UTF-8 or the equivalent to your language if it isn’t American English.

So I should be able to get rid of this error without having to change my locale to en_US.

My locale is set to en_GB.UTF-8: bruh2

What am I missing to keep my locale set to en_GB.UTF-8 and get rid of this error? (I would prefer not to install en_US locale because I'm in the UK)

Edit: Using sexy theme

sudoharun commented 1 year ago

closing since I moved to zsh after a re-install of arch

mefor44 commented 2 weeks ago

I have the saem error, can we reopen this?

seefood commented 2 weeks ago

do you have the locale generated? Can you show this error is because of Bash-it and not happening in general anyway?

akinomyoga commented 2 weeks ago

As I commented in https://github.com/Bash-it/bash-it/issues/2269#issuecomment-2478178460, this error is caused by Bash-it assuming the existence of a specific locale en_US.UTF-8. Even if the locales are generated, if en_US.UTF-8 is not included in the set of the enabled locales, it doesn't exist. In general, one should not assume the locale en_US.UTF-8 is present in the system. The solution is also given in https://github.com/Bash-it/bash-it/issues/2269#issuecomment-2478178460.