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

Change: Moved decomposing logic which changes command.script to get_new_command instead of match.

This commit is contained in:
ik1ne 2019-10-15 23:22:59 +09:00
parent 28279e7b94
commit 485b29d4f7

View File

@ -104,7 +104,7 @@ def match(command):
return False
if any(['' <= ch <= '' or '' <= ch <= '' or '' <= ch <= ''
for ch in command.script]):
command.script = _decompose_korean(command)
return True
matched_layout = _get_matched_layout(command)
return (matched_layout and
@ -112,5 +112,8 @@ def match(command):
def get_new_command(command):
if any(['' <= ch <= '' or '' <= ch <= '' or '' <= ch <= ''
for ch in command.script]):
command.script = _decompose_korean(command)
matched_layout = _get_matched_layout(command)
return _switch_command(command, matched_layout)