diff --git a/powerline/segments/shell.py b/powerline/segments/shell.py index 66699ac3..e870048a 100644 --- a/powerline/segments/shell.py +++ b/powerline/segments/shell.py @@ -22,7 +22,7 @@ def last_pipe_status(pl, segment_info): ''' last_pipe_status = segment_info['args'].last_pipe_status if any(last_pipe_status): - return [{"contents": str(status), "highlight_group": "exit_fail" if status else "exit_success"} + return [{'contents': str(status), 'highlight_group': 'exit_fail' if status else 'exit_success', 'draw_inner_divider': True} for status in last_pipe_status] else: return None diff --git a/tests/test_segments.py b/tests/test_segments.py index 6e2737c5..d8c7bb3d 100644 --- a/tests/test_segments.py +++ b/tests/test_segments.py @@ -29,10 +29,11 @@ class TestShell(TestCase): segment_info['args'].last_pipe_status = [0, 0, 0] self.assertEqual(shell.last_pipe_status(pl=pl, segment_info=segment_info), None) segment_info['args'].last_pipe_status = [0, 2, 0] - self.assertEqual(shell.last_pipe_status(pl=pl, segment_info=segment_info), - [{'contents': '0', 'highlight_group': 'exit_success'}, - {'contents': '2', 'highlight_group': 'exit_fail'}, - {'contents': '0', 'highlight_group': 'exit_success'}]) + self.assertEqual(shell.last_pipe_status(pl=pl, segment_info=segment_info), [ + {'contents': '0', 'highlight_group': 'exit_success', 'draw_inner_divider': True}, + {'contents': '2', 'highlight_group': 'exit_fail', 'draw_inner_divider': True}, + {'contents': '0', 'highlight_group': 'exit_success', 'draw_inner_divider': True} + ]) class TestCommon(TestCase):