mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 17:48:41 +00:00
Change: Moved decomposing logic which changes command.script to get_new_command instead of match.
This commit is contained in:
parent
28279e7b94
commit
485b29d4f7
@ -104,7 +104,7 @@ def match(command):
|
|||||||
return False
|
return False
|
||||||
if any(['ㄱ' <= ch <= 'ㅎ' or 'ㅏ' <= ch <= 'ㅣ' or '가' <= ch <= '힣'
|
if any(['ㄱ' <= ch <= 'ㅎ' or 'ㅏ' <= ch <= 'ㅣ' or '가' <= ch <= '힣'
|
||||||
for ch in command.script]):
|
for ch in command.script]):
|
||||||
command.script = _decompose_korean(command)
|
return True
|
||||||
|
|
||||||
matched_layout = _get_matched_layout(command)
|
matched_layout = _get_matched_layout(command)
|
||||||
return (matched_layout and
|
return (matched_layout and
|
||||||
@ -112,5 +112,8 @@ def match(command):
|
|||||||
|
|
||||||
|
|
||||||
def get_new_command(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)
|
matched_layout = _get_matched_layout(command)
|
||||||
return _switch_command(command, matched_layout)
|
return _switch_command(command, matched_layout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user