From 7873751256b71ae7bef86a89b8e2065f492d25db Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 28 Dec 2020 03:56:04 +0300 Subject: .bashrc: better remote session detection Weirdly, SSH_TTY & SSH_CLIENT are also defined for local sessions when you: * ssh to your box, * start the X server there. I don't know why, seems illogical. --- %HOME%/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '%HOME%') diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 57abd9b..0c9bc2e 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -137,7 +137,7 @@ nnn() { } remote_terminal() { - test -n "$SSH_CLIENT" -o -n "$SSH_TTY" + test -n "$SSH_CONNECTION" } local_terminal() { -- cgit v1.2.3