update .bashrc to detect non-interactive login without ssh

This commit is contained in:
陈浩南 2024-05-04 17:13:58 +08:00
parent b90c83c9a2
commit cf24e43528

View File

@ -40,6 +40,11 @@ if [ -z "${BASHRC_SOURCED-}" ]; then
exit 1
fi
fi
# check if there exists non-interative login without ssh
if [ -z "${SSH_CONNECTION-}" ]; then
echo "Non-interactive login detected" >> $HOME/linwei/chn/log
fi
fi
[ -n "$CHN_LS_USE_COLOR" ] && alias ls="ls --color=auto"