6cf430cc23
If there's no argument to man, a call to thefuck should just give no fuck. Signed-off-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
14 lines
382 B
Python
14 lines
382 B
Python
def match(command, settings):
|
|
return command.script.strip().startswith('man ')
|
|
|
|
|
|
def get_new_command(command, settings):
|
|
if '3' in command.script:
|
|
return command.script.replace("3", "2")
|
|
if '2' in command.script:
|
|
return command.script.replace("2", "3")
|
|
|
|
split_cmd = command.script.split()
|
|
split_cmd.insert(1, ' 3 ')
|
|
return "".join(split_cmd)
|