From c50c23ba5ca6b5511a059a0699d2fe4569d611b7 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Thu, 24 Apr 2025 02:13:59 -0300 Subject: [PATCH] Fix not exporting variables correctly --- dot_config/bash/dot_bashrc | 6 +++++- dot_config/zsh/dot_zshrc | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dot_config/bash/dot_bashrc b/dot_config/bash/dot_bashrc index 6f9c253..83ebc3f 100644 --- a/dot_config/bash/dot_bashrc +++ b/dot_config/bash/dot_bashrc @@ -6,7 +6,11 @@ # Workaround for SSH/Login sessions # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017 -[[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]] && export "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" +if [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then + set -a + eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" + set +a +fi # If we have local bash-completion, use it [[ -f $HOME/.local/bin/bash_completion ]] && . "$HOME/.local/bin/bash_completion" diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index 82edaa3..85484ce 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -6,7 +6,11 @@ # Workaround for SSH/Login sessions # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017 -[[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]] && export "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" +if [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then + set -a + eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" + set +a +fi autoload -Uz promptinit autoload -Uz compinit