1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 02:01:13 +00:00

add comments to the code

This commit is contained in:
Nikos Kakonas 2022-06-20 16:39:34 +00:00
parent d898a4df69
commit cbfa1ae196

View File

@ -1,6 +1,10 @@
from thefuck.utils import get_all_executables, which
# this rule is activated when the typed command is
# in uppercase letters and if the command is not
# executed. However in order to activate this rule
# it is necessary the first word of the whole command
# to be valid.
def match(command):
return (command.script.isupper()
and not which(command.script_parts[0])
@ -8,7 +12,7 @@ def match(command):
or 'is not recognized as' in command.output)
and (command.script_parts[0].lower() in get_all_executables()))
# returns the same command in lowercase letters
def get_new_command(cmd):
return cmd.script.lower()