From 32a08d9433d0d683b6aa49b90d486b422bc85176 Mon Sep 17 00:00:00 2001 From: Gianluca Gabrielli Date: Wed, 30 Oct 2024 11:31:37 +0100 Subject: [PATCH] fix(segments): Use SSH_CONNECTION instead of the now deprecated SSH_CLIENT env var SSH_CLIENT was deprecated more than 2 decades ago. See here [0]. [0] https://github.com/openssh/openssh-portable/commit/f37e246 --- powerline/segments/common/net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerline/segments/common/net.py b/powerline/segments/common/net.py index b5d9062d..9e1da8da 100644 --- a/powerline/segments/common/net.py +++ b/powerline/segments/common/net.py @@ -27,7 +27,7 @@ def hostname(pl, segment_info, only_if_ssh=False, exclude_domain=False): == 'ee5bcdc6-b749-11e7-9456-50465d597777' ): return 'hostname' - if only_if_ssh and not segment_info['environ'].get('SSH_CLIENT'): + if only_if_ssh and not segment_info['environ'].get('SSH_CONNECTION'): return None if exclude_domain: return socket.gethostname().split('.')[0]