diff --git a/thefuck/rules/git_commit_message.py b/thefuck/rules/git_commit_message.py new file mode 100644 index 0000000..892e430 --- /dev/null +++ b/thefuck/rules/git_commit_message.py @@ -0,0 +1,12 @@ +from thefuck.specific.git import git_support + +@git_support +def match(command): + return "commit" in command.script_parts + +@git_support +def get_new_command(command): + command_parts = command.script_parts[:] + index = command_parts.index('commit') + 1 + command_parts.insert(index, '-m') + return ' '.join(command_parts)