Give non-login shells the system locale

/etc/profile.d/locale.sh only runs for login shells, so bash started by
SSH or herdr's remote bridge ran in the C locale, where printf emits
\u/\U escapes literally instead of the character.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-08-10 05:58:56 -07:00
co-authored by Claude Opus 5
parent 7633d8dee4
commit 6d7826d635
2 changed files with 40 additions and 0 deletions
+12
View File
@@ -16,6 +16,18 @@ export MANPAGER="sh -c 'col -bx | bat -l man -p'"
# other non-interactive non-login bash sessions still get OMARCHY_PATH.
[ -r /usr/share/omarchy/default/bash/env-bootstrap ] && . /usr/share/omarchy/default/bash/env-bootstrap
# /etc/profile.d/locale.sh is what puts /etc/locale.conf into the environment,
# and it only runs for login shells. Bash started by SSH or herdr's remote
# bridge misses it and lands in the C locale, where printf emits \u/\U escapes
# literally instead of the character. Mirror locale.sh for those sessions.
if [ -z "${LANG:-}" ]; then
[ -r /etc/locale.conf ] && . /etc/locale.conf
LANG="${LANG:-C.UTF-8}"
export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \
LC_IDENTIFICATION
fi
case ":$PATH:" in
*":$HOME/.local/bin:"*) ;;
*) export PATH="$PATH:$HOME/.local/bin" ;;