zsh: no actually we need to do this properly
This commit is contained in:
parent
166fc85d47
commit
dac421f56b
|
@ -2,9 +2,11 @@
|
|||
# processes of this shell and checking for things like sshd/tailscaled. Runs
|
||||
# first because multiple other things rely on this.
|
||||
|
||||
is_remote=""
|
||||
proctree="$(pstree -s $$)"
|
||||
echo "$proctree" | grep "sshd" && is_remote="$is_remote sshd"
|
||||
echo "$proctree" | grep "tailscaled" && is_remote="$is_remote tailscaled"
|
||||
declare -a is_remote
|
||||
is_remote=()
|
||||
|
||||
[ -n "$is_remote" ] && export IS_REMOTE_SESSION="$(echo $is_remote | xargs)"
|
||||
proctree="$(pstree -s $$)"
|
||||
[[ "$proctree" =~ sshd ]] && is_remote+=sshd
|
||||
[[ "$proctree" =~ tailscaled ]] && is_remote+=tailscaled
|
||||
|
||||
[ -n "$is_remote" ] && export IS_REMOTE_SESSION="$is_remote[@]"
|
||||
|
|
Loading…
Reference in a new issue