From b123e9322e87c19fdaa56fc38681d6002fdaf1bb Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Wed, 18 Feb 2026 15:50:37 +0000 Subject: [PATCH] Fixed bash config --- dot_bashrc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dot_bashrc b/dot_bashrc index f8ffb5a..3d180fa 100644 --- a/dot_bashrc +++ b/dot_bashrc @@ -30,14 +30,14 @@ export LESS_TERMCAP_se=$'\e[0m' export LESS_TERMCAP_us=$'\e[00;36m' export LESS_TERMCAP_ue=$'\e[0m' -if [ -f ~/.config/path.env ]; then - while read -r line; do - [[ -z "$line" || "$line" == #* ]] && continue - p=$(eval echo "$line") - if [ -d "$p" ]; then - export PATH="$p:$PATH" +if [ -f "$HOME/.config/path.env" ]; then + while IFS= read -r line || [[ -n "$line" ]]; do + [[ "$line" =~ ^#.*$ || -z "$line" ]] && continue + expanded_path="${line/#\~/$HOME}" + if [ -d "$expanded_path" ]; then + export PATH="$expanded_path:$PATH" fi - done < ~/.config/path.env + done < "$HOME/.config/path.env" fi # --- Aliases ---