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