Only launch zellij in SSH

This commit is contained in:
Marko Korhonen 2024-03-03 09:52:53 +02:00
parent ee3f962386
commit b5c1a1399b
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -1,9 +1,4 @@
if [[ -z "$ZELLIJ" ]]; then
# Launch or attach to existing session if logging in over ssh
if [[ -n "$SSH_CONNECTION" ]]; then
exec zellij attach -c SSH
# Launch a new local session otherwise
else
exec zellij
fi
# Launch or attach zellij to existing session if logging in over ssh
if [[ -z "$ZELLIJ" && -n "$SSH_CONNECTION" ]]; then
exec zellij attach -c SSH
fi