1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-11-19 16:26:03 +00:00
Files
thefuck/thefuck/rules/git_remote_seturl_add.py
Paul-Louis NECH 04b83cf7e8 Rules: git remote add instead of set-url if remote does not exist
Tests: Added test for git_remote_seturl_add

Rules: renamed new rule with a more appropriate name

README: added new rule

Style: Formatting

New rule: corrected test name

Developed tests
2016-03-04 22:35:55 +01:00

15 lines
332 B
Python

from thefuck.utils import replace_argument
from thefuck.specific.git import git_support
@git_support
def match(command):
return ('set-url' in command.script and 'fatal: No such remote' in command.stderr)
def get_new_command(command):
return replace_argument(command.script, 'set-url', 'add')
enabled_by_default = True