1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 06:38:32 +00:00

fix empty history crash

This commit is contained in:
Divy Jain 2020-11-10 22:09:56 +05:30
parent 836f6eeac5
commit 97bd57fd4d
No known key found for this signature in database
GPG Key ID: 45ABD8EE0FEC4C0B
2 changed files with 2 additions and 0 deletions

View File

@ -139,6 +139,7 @@ class TestCommand(object):
env=os_environ)
@pytest.mark.parametrize('script, result', [
([], None),
([''], None),
(['', ''], None),
(['ls', '-la'], 'ls -la'),

View File

@ -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):