We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45866a1 commit 9689524Copy full SHA for 9689524
1 file changed
testvenv_setup.sh
@@ -17,18 +17,17 @@ else
17
echo "[INFO] Alias already exists in .bashrc"
18
fi
19
20
-echo "[SETUP] Adding login message to ~/.bashrc"
+echo "[SETUP] Adding one-time login message to ~/.bashrc"
21
LOGIN_MARKER="# >>> testvenv login message >>>"
22
if ! grep -Fxq "$LOGIN_MARKER" ~/.bashrc; then
23
cat << 'EOF' >> ~/.bashrc
24
25
# >>> testvenv login message >>>
26
-function show_testvenv_info() {
27
- local CYAN='\033[0;36m'
28
- local NC='\033[0m' # No Color
+if [[ $- == *i* ]]; then
+ CYAN='\033[0;36m'
+ NC='\033[0m'
29
echo -e "\n${CYAN}Test Virtual Environment:${NC} testvenv\n"
30
-}
31
-PROMPT_COMMAND="show_testvenv_info"
+fi
32
# <<< testvenv login message <<<
33
EOF
34
echo "[SETUP] Login message added to .bashrc"
0 commit comments