diff --git a/tests/rules/test_man.py b/tests/rules/test_man.py index 1c9095c..b51b116 100644 --- a/tests/rules/test_man.py +++ b/tests/rules/test_man.py @@ -23,7 +23,7 @@ def test_not_match(command): @pytest.mark.parametrize('command, new_command', [ - (Command('man read'), ['man 3 read', 'man 2 read', 'read --help']), + (Command('man read'), ['read --help', 'man 3 read', 'man 2 read']), (Command('man 2 read'), 'man 3 read'), (Command('man 3 read'), 'man 2 read'), (Command('man -s2 read'), 'man -s3 read'), diff --git a/thefuck/rules/man.py b/thefuck/rules/man.py index 6fcea5a..3d0347a 100644 --- a/thefuck/rules/man.py +++ b/thefuck/rules/man.py @@ -21,7 +21,7 @@ def get_new_command(command): last_arg = command.script_parts[-1] return [ + last_arg + ' --help', "".join(split_cmd3), "".join(split_cmd2), - last_arg + ' --help', ]