diff --git a/tmuxp/cli.py b/tmuxp/cli.py index 0dc63711d3f..44d5fc8cbb1 100644 --- a/tmuxp/cli.py +++ b/tmuxp/cli.py @@ -432,8 +432,11 @@ def session_complete(command, commands, ctext): commands[:] = [] ctext_subargs = ctext.replace(command + ' ', '') - sessions = [s.get('session_name') for s in t._sessions] - commands.extend([c for c in sessions if ctext_subargs in c]) + try: + sessions = [s.get('session_name') for s in t._sessions] + commands.extend([c for c in sessions if ctext_subargs in c]) + except Exception: + pass def config_complete(command, commands, ctext): if ctext.startswith(command + ' '):