1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-21 04:18:55 +00:00

Add info about rules and license

This commit is contained in:
nvbn 2015-04-17 21:51:13 +02:00
parent d32177e9b3
commit 13c606afac

View File

@ -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