diff --git a/tests/test_types.py b/tests/test_types.py index bea8f59a..3a43cded 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -139,6 +139,7 @@ class TestCommand(object): env=os_environ) @pytest.mark.parametrize('script, result', [ + ([], None), ([''], None), (['', ''], None), (['ls', '-la'], 'ls -la'), diff --git a/thefuck/entrypoints/fix_command.py b/thefuck/entrypoints/fix_command.py index e3e3b01f..6946653e 100644 --- a/thefuck/entrypoints/fix_command.py +++ b/thefuck/entrypoints/fix_command.py @@ -23,6 +23,7 @@ def _get_raw_command(known_args): diff = SequenceMatcher(a=alias, b=command).ratio() if diff < const.DIFF_WITH_ALIAS or command in executables: return [command] + return [] def fix_command(known_args):