mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Setup locale properly in new shell (thanks @casimir)
This commit is contained in:
parent
86b0708143
commit
8445c761f0
1 changed files with 9 additions and 0 deletions
|
@ -1,6 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Dynamically discover canonical path to alacritty binary
|
||||||
BIN_DIR=$(cd "$(dirname "$0")"; pwd)
|
BIN_DIR=$(cd "$(dirname "$0")"; pwd)
|
||||||
|
|
||||||
|
# Query OS for locale and setup alacritty shell to conform
|
||||||
|
ALACRITTY_LOCALE="$(osascript -e "return user locale of (get system info)")"
|
||||||
|
export LANG="${ALACRITTY_LOCALE}.UTF-8"
|
||||||
|
export LC_CTYPE="${ALACRITTY_LOCALE}.UTF-8"
|
||||||
|
|
||||||
|
# Start alacritty in user's home directory
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
|
|
||||||
|
# Engage
|
||||||
exec "$BIN_DIR/alacritty"
|
exec "$BIN_DIR/alacritty"
|
||||||
|
|
Loading…
Reference in a new issue