Why is my locale
setting replaced when I run an external command with :!cmd
?
And which configurations should I check to find the cause of this problem? I've checked configs for my shell (zsh): .zshenv
, .zshrc
; my configs for neovim; my config for KDE. But I still don't understand why nvim seems to reset locale to en
from en_GB
Within vim, running :!locale
gives me this output:
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en
LC_CTYPE="en"
LC_NUMERIC="en"
LC_TIME="en"
LC_COLLATE="en"
LC_MONETARY="en"
LC_MESSAGES="en"
LC_PAPER="en"
LC_NAME="en"
LC_ADDRESS="en"
LC_TELEPHONE="en"
LC_MEASUREMENT="en"
LC_IDENTIFICATION="en"
LC_ALL=
In zsh I get:
[I] ➜ locale
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
UPDATE.
Inside nvim: :!echo $SHELL
gets "/bin/zsh", :set shell
: "shell=/bin/zsh".
In .zprofile
and in .zshenv
there is nothing. In .zshrc
no changes to locale
, LANG.
UPDATE 2
The problem is with hledger not being invoked correctly (with 'en' locale).