envrc: Kill shell when accessing repo from eduroam

This commit is contained in:
2024-01-05 13:54:15 +01:00
parent c86fb28a08
commit 80af6263a3

View File

@@ -3,6 +3,12 @@ envrc() {
git fetch --all
}
# Stop configuring when in eduraom, you have probably other stuff to do!
if nmcli con show --active | grep -q eduroam; then
parent_shell=$(ps -eo ppid= -q $PPID)
[ -z "$parent_shell" ] || kill -KILL $parent_shell
fi
# Run in background
envrc 0<&- &>/dev/null 3>&- & disown