From 6891475ce83c093699230ba7d92f57357cfcde25 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 7 Jul 2025 23:36:33 +0200 Subject: [PATCH] fixed some weired output in preload --- .bashrc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.bashrc b/.bashrc index 65c4a90..cd84196 100644 --- a/.bashrc +++ b/.bashrc @@ -49,9 +49,20 @@ if $blesh; then fi if $blesh; then - [[ $- == *i* ]] && { source /usr/share/blesh/ble.sh --noattach || source "$HOME/.local/share/blesh/ble.sh" --noattach; } - # Enable history expansion (!!, !$, etc.) in ble.sh - bleopt history_expand_on_space=1 + if [[ $- == *i* ]]; then + ble=( + "/usr/share/blesh/ble.sh" + "$HOME/.local/share/blesh/ble.sh" + ) + + for b in "${ble[@]}"; do + if [[ -e "$b" ]]; then + source "$b" --noattach + break && + printf "${BLUE}${BOLD}Sourced ble.sh at ${GREEN}$b${NC}\n" + fi + done + fi fi # Display stored messages