Merge branch 'xdg' of https://github.com/mcarton/thefuck into mcarton-xdg
This commit is contained in:
@@ -225,7 +225,7 @@ Bundled, but not enabled by default:
|
||||
## Creating your own rules
|
||||
|
||||
For adding your own rule you should create `your-rule-name.py`
|
||||
in `~/.thefuck/rules`. The rule should contain two functions:
|
||||
in `~/.config/thefuck/rules`. The rule should contain two functions:
|
||||
|
||||
```python
|
||||
match(command: Command) -> bool
|
||||
@@ -242,7 +242,7 @@ and optional `enabled_by_default`, `requires_output` and `priority` variables.
|
||||
`Command` has three attributes: `script`, `stdout` and `stderr`.
|
||||
|
||||
*Rules api changed in 3.0:* For accessing settings in rule you need to import it with `from thefuck.conf import settings`.
|
||||
`settings` is a special object filled with `~/.thefuck/settings.py` and values from env ([see more below](#settings)).
|
||||
`settings` is a special object filled with `~/.config/thefuck/settings.py` and values from env ([see more below](#settings)).
|
||||
|
||||
Simple example of the rule for running script with `sudo`:
|
||||
|
||||
@@ -272,7 +272,7 @@ requires_output = True
|
||||
|
||||
## Settings
|
||||
|
||||
The Fuck has a few settings parameters which can be changed in `~/.thefuck/settings.py`:
|
||||
The Fuck has a few settings parameters which can be changed in `$XDG_CONFIG_HOME/thefuck/settings.py` (`$XDG_CONFIG_HOME` defaults to `~/.config`):
|
||||
|
||||
* `rules` – list of enabled rules, by default `thefuck.conf.DEFAULT_RULES`;
|
||||
* `exclude_rules` – list of disabled rules, by default `[]`;
|
||||
|
||||
Reference in New Issue
Block a user