Add non-interactive check back

This commit is contained in:
Ryan Hughes committed 2025-10-22 20:59:26 -04:00
1 parent bddccf30cb
commit 83d4349ea1
2 files changed
+10

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
echo "Ensure interactive shell check is at the top of .bashrc"
BASHRC="$HOME/.bashrc"
if [ -f "$BASHRC" ] && ! grep -q '\[\[ $- != \*i\* \]\] && return' "$BASHRC"; then
sed -i '1i# If not running interactively, don'\''t do anything (leave this at the top of this file)\n[[ $- != *i* ]] && return\n' "$BASHRC"
fi