moved the generation of local environment variables to its own generator script

This commit is contained in:
Tobias Schmidl 2023-01-24 15:33:08 +01:00
parent fa32f1be82
commit ef6d56b2a8
4 changed files with 25 additions and 17 deletions

9
.zshrc
View file

@ -1,10 +1,3 @@
if [ -d /usr/lib/systemd/system-environment-generators ];
then
run-parts /usr/lib/systemd/user-environment-generators | grep -v '#' | grep -v '^ $' | while read cur_env; do export ${cur_env}; done
else
cat $HOME/.config/environment.d/* | grep -v '#' | grep -v '^$' | while read cur_env; do export "${cur_env}"; done
fi
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
@ -41,6 +34,8 @@ EOBUNDLES
antigen theme gallifrey
antigen apply
source "$HOME/.local/bin/generate-env"
hash direnv &> /dev/null && eval "$(direnv hook zsh)"
chpwd() { exa }
ZSH_AUTOSUGGEST_STRATEGY=match_prev_cmd