From d484a119409e6ec70e74d3f34eb91ee899c3cf6d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Jul 2023 16:26:43 +0900 Subject: [PATCH] feat : Replace 'add' with 'git add',which is a common mistake beginners makes --- thefuck/rules/git_add_no_git.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 thefuck/rules/git_add_no_git.py diff --git a/thefuck/rules/git_add_no_git.py b/thefuck/rules/git_add_no_git.py new file mode 100644 index 0000000..48dec5e --- /dev/null +++ b/thefuck/rules/git_add_no_git.py @@ -0,0 +1,11 @@ +def match(command): +## + return ( + command.script == "add ." + ) + + + + +def get_new_command(command): + return (command.script.replace("add .","git add .",1))