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=() is_remote=()
proctree="$(pstree -s $$)" proctree="$(pstree -s $$)"
for d in $remote_daemons[@]; do for d in $remote_daemons[@]; [[ "$proctree" =~ "$d" ]] && is_remote+="$d"
[[ "$proctree" =~ $d ]] && is_remote+="$d"
done
[ -n "$is_remote" ] && export IS_REMOTE_SESSION="$is_remote[@]" [ -n "$is_remote" ] && export IS_REMOTE_SESSION="$is_remote[@]"