diff --git a/tests/test_main.py b/tests/test_main.py index 50e7c03a..05858256 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -153,7 +153,7 @@ class TestConfirm(object): def test_with_side_effect_and_without_confirmation(self, capsys): assert main.confirm('command', Mock(), Mock(require_confirmation=False)) - assert capsys.readouterr() == ('', 'command*\n') + assert capsys.readouterr() == ('', 'command (+side effect)\n') # `stdin` fixture should be applied after `capsys` def test_when_confirmation_required_and_confirmed(self, capsys, stdin): @@ -165,7 +165,7 @@ class TestConfirm(object): def test_when_confirmation_required_and_confirmed_with_side_effect(self, capsys, stdin): assert main.confirm('command', Mock(), Mock(require_confirmation=True, no_colors=True)) - assert capsys.readouterr() == ('', 'command* [enter/ctrl+c]') + assert capsys.readouterr() == ('', 'command (+side effect) [enter/ctrl+c]') def test_when_confirmation_required_and_aborted(self, capsys, stdin): stdin.side_effect = KeyboardInterrupt diff --git a/thefuck/logs.py b/thefuck/logs.py index 9cfdad4e..9df6663c 100644 --- a/thefuck/logs.py +++ b/thefuck/logs.py @@ -29,19 +29,19 @@ def rule_failed(rule, exc_info, settings): def show_command(new_command, side_effect, settings): - sys.stderr.write('{bold}{command}{side_effect}{reset}\n'.format( + sys.stderr.write('{bold}{command}{reset}{side_effect}\n'.format( command=new_command, - side_effect='*' if side_effect else '', + side_effect=' (+side effect)' if side_effect else '', bold=color(colorama.Style.BRIGHT, settings), reset=color(colorama.Style.RESET_ALL, settings))) def confirm_command(new_command, side_effect, settings): sys.stderr.write( - '{bold}{command}{side_effect}{reset} ' + '{bold}{command}{reset}{side_effect} ' '[{green}enter{reset}/{red}ctrl+c{reset}]'.format( command=new_command, - side_effect='*' if side_effect else '', + side_effect=' (+side effect)' if side_effect else '', bold=color(colorama.Style.BRIGHT, settings), green=color(colorama.Fore.GREEN, settings), red=color(colorama.Fore.RED, settings),