[bash] Fix sourcing of xdg vars and terminfo
Fixed setting up the initial variable pointing to the xdg directory to enable bash to source its files from the `.config environment`
This commit is contained in:
parent
3a40925615
commit
75a8978a0a
2 changed files with 6 additions and 1 deletions
|
@ -4,6 +4,9 @@
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
|
|
||||||
|
# ensure bash is set up for its initial sourcing
|
||||||
|
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||||
|
|
||||||
# load global sh env vars
|
# load global sh env vars
|
||||||
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
|
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
|
||||||
if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
|
if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
|
||||||
|
|
|
@ -43,4 +43,6 @@ export LANG="en_US.UTF-8"
|
||||||
export SHELL=${SHELL:-/bin/bash}
|
export SHELL=${SHELL:-/bin/bash}
|
||||||
|
|
||||||
# if terminfo for our terminal emulator does not exist fall back to xterm
|
# if terminfo for our terminal emulator does not exist fall back to xterm
|
||||||
[ "$(find /usr/share/terminfo -name "$TERMINAL*" | wc -l)" -eq 0 ] && export TERM=xterm
|
if [ "$(find /usr/share/terminfo -name "$TERMINAL*" | wc -l)" -eq 0 ] || [ -z "$TERMINAL" ]; then
|
||||||
|
export TERM=xterm
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue