From 9dc64008eafba4218e9a7206a1670b2bad5de7b9 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Thu, 9 Feb 2023 13:35:39 +0100 Subject: [PATCH] Only set shell variables for the specific shell Signed-off-by: Severin Kaderli --- system/.config/environment.d/40_shell.conf | 5 ----- system/.config/zsh/.zprofile | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 system/.config/environment.d/40_shell.conf diff --git a/system/.config/environment.d/40_shell.conf b/system/.config/environment.d/40_shell.conf deleted file mode 100644 index 32f4351..0000000 --- a/system/.config/environment.d/40_shell.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Zsh -HISTCONTROL="ignoreboth" -HISTSIZE="10000" -SAVEHIST="${HISTSIZE}" -HISTFILESIZE="${HISTSIZE}" \ No newline at end of file diff --git a/system/.config/zsh/.zprofile b/system/.config/zsh/.zprofile index 88d5bb1..9acfba1 100644 --- a/system/.config/zsh/.zprofile +++ b/system/.config/zsh/.zprofile @@ -12,9 +12,15 @@ # USAGE: # This script is automatically executed when you start a login shell. -# Load env variables +# Load env variables (might have problems with spaces on Zsh) export $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator) +# Set shell specific env variables +export HISTCONTROL="ignoreboth" +export HISTSIZE="10000" +export SAVEHIST="${HISTSIZE}" +export HISTFILESIZE="${HISTSIZE}" + if [[ -f "${HOME}/.config/zsh/.zshrc" ]]; then . "${HOME}/.config/zsh/.zshrc" fi