From 13c606afac532de92d64fc0543a1b1588a6a5e12 Mon Sep 17 00:00:00 2001 From: nvbn Date: Fri, 17 Apr 2015 21:51:13 +0200 Subject: [PATCH] Add info about rules and license --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 28771141..ad2e76e0 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,16 @@ And add to `.bashrc` or `.zshrc`: alias fuck='$(thefuck $(fc -ln -1))' ``` +## How it works + +The Fuck tries to match rule for the previous command, create new command +using matched rule and run it. Rules enabled by default: + +* `git_no_command` – fixes wrong git commands like `git brnch`; +* `git_push` – adds `--set-upstream origin $branch` to previous failed `git push`; +* `no_command` – fixes wrong console commands, for example `vom/vim`; +* `sudo` – prepends `sudo` to previous command if it failed because of permissions. + ## Creating your own rules For adding your own rule you should create `your-rule-name.py` @@ -109,3 +119,5 @@ Run tests: ```bash py.test ``` + +## License MIT