Skip to content

Commit 9689524

Browse files
SilentWoofSilentWoof
authored andcommitted
Replace prompt-based testvenv banner with one-time login message
1 parent 45866a1 commit 9689524

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

testvenv_setup.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@ else
1717
echo "[INFO] Alias already exists in .bashrc"
1818
fi
1919

20-
echo "[SETUP] Adding login message to ~/.bashrc"
20+
echo "[SETUP] Adding one-time login message to ~/.bashrc"
2121
LOGIN_MARKER="# >>> testvenv login message >>>"
2222
if ! grep -Fxq "$LOGIN_MARKER" ~/.bashrc; then
2323
cat << 'EOF' >> ~/.bashrc
2424
2525
# >>> testvenv login message >>>
26-
function show_testvenv_info() {
27-
local CYAN='\033[0;36m'
28-
local NC='\033[0m' # No Color
26+
if [[ $- == *i* ]]; then
27+
CYAN='\033[0;36m'
28+
NC='\033[0m'
2929
echo -e "\n${CYAN}Test Virtual Environment:${NC} testvenv\n"
30-
}
31-
PROMPT_COMMAND="show_testvenv_info"
30+
fi
3231
# <<< testvenv login message <<<
3332
EOF
3433
echo "[SETUP] Login message added to .bashrc"

0 commit comments

Comments
 (0)