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