mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Updates to look for additional local environment variables
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
# This needs placed in the ~/.zshenv
|
||||
#
|
||||
# This sources general default environment variables from `ZDOTDIR`, local overrides may be stored
|
||||
# in `$XDG_DATA_HOME/zsh/env.zsh`. The `ZDOTDIR/.zshrc-local` is a legacy file location that I used,
|
||||
# but should be removed when all my machines are updated to use the local overrides file.
|
||||
|
||||
export ZDOTDIR="$HOME/.config/zsh"
|
||||
[ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv"
|
||||
|
||||
@@ -82,13 +82,3 @@ export ANSIBLE_HOME="$XDG_CONFIG_HOME/ansible"
|
||||
# Tmux-Sessionator path.
|
||||
export TMUX_SESSIONATOR_PATH="$HOME:$SCRIPTS:$LOCAL_REPOS:$HHE_REPOS:$REPOS:$GH_REPOS"
|
||||
|
||||
function _source_files_if_found {
|
||||
for file in "$@"; do
|
||||
[ -x "$file" ] && source "$file"
|
||||
done
|
||||
}
|
||||
|
||||
_source_files_if_found \
|
||||
"$ZDOTDIR/.zshrc-local" \
|
||||
"$XDG_DATA_HOME/env.zsh" \
|
||||
"$XDG_DATA_HOME/env"
|
||||
|
||||
@@ -166,5 +166,8 @@ alias nvim-lazy='NVIM_APPNAME=lazy nvim'
|
||||
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget-hsts"
|
||||
|
||||
#------------------------------ local configs ------------------------------
|
||||
# TODO: The .zshrc-local is a legacy location and should be removed once my machines are
|
||||
# use the new location in XDG_DATA_HOME.
|
||||
_source_if "$ZDOTDIR/.zshrc-local"
|
||||
_source_if "$XDG_DATA_HOME/zsh/env.zsh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user