From 80028800a25960286a7c25771dfcaa02a424dbb3 Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Thu, 2 May 2024 20:14:02 +0200 Subject: [PATCH] Update prompt_bar.py --- xontrib/prompt_bar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xontrib/prompt_bar.py b/xontrib/prompt_bar.py index 6e472e2..792625b 100644 --- a/xontrib/prompt_bar.py +++ b/xontrib/prompt_bar.py @@ -71,7 +71,10 @@ def _field_date_time_tz(): def _screens(): line = [] sty = None - for l in __xonsh__.subproc_captured_stdout(['bash', '-c', 'screen -ls; exit 0']).splitlines(): # bash is to fix https://github.com/xonsh/xonsh/issues/4912 + scrs = __xonsh__.subproc_captured_stdout(['bash', '-c', 'screen -ls; exit 0']) + if isinstance(scrs, str): + scrs = scrs.splitlines() + for l in scrs: # bash is to fix https://github.com/xonsh/xonsh/issues/4912 if '\t' in l: screen_name = l.split('\t')[1].split('.')[1] if sty is None: # lazy load