zsh: one-liner wooo

This commit is contained in:
Erin 2023-07-19 23:50:32 -04:00
parent fe995df43d
commit 5fae6d1063

View file

@ -13,8 +13,6 @@ declare -a is_remote
is_remote=()
proctree="$(pstree -s $$)"
for d in $remote_daemons[@]; do
[[ "$proctree" =~ $d ]] && is_remote+="$d"
done
for d in $remote_daemons[@]; [[ "$proctree" =~ "$d" ]] && is_remote+="$d"
[ -n "$is_remote" ] && export IS_REMOTE_SESSION="$is_remote[@]"