dots/05-ssh-detect/profile
2019-02-22 13:13:19 +11:00

10 lines
204 B
Bash

if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=remote/ssh
else
case $(ps -o comm= -p $PPID) in
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
esac
fi
# vim: set syntax=bash: