Files
thefuck/thefuck/rules/git_main_master.py
T
2021-07-09 16:13:25 +02:00

17 lines
358 B
Python

from thefuck.specific.git import git_support
@git_support
def match(command):
return "'master'" in command.output or "'main'" in command.output
@git_support
def get_new_command(command):
if "'master'" in command.output:
return command.script.replace("master", "main")
return command.script.replace("main", "master")
priority = 1200