Add ability to change settings via environment variables

This commit is contained in:
nvbn
2015-04-22 20:18:53 +02:00
parent b4b599df80
commit 69a9516477
8 changed files with 233 additions and 61 deletions
+8 -1
View File
@@ -196,11 +196,18 @@ def get_new_command(command, settings):
The Fuck has a few settings parameters, they can be changed in `~/.thefuck/settings.py`:
* `rules` – list of enabled rules, by default all;
* `rules` – list of enabled rules, by default `thefuck.conf.DEFAULT`;
* `require_confirmation` – require confirmation before running new command, by default `False`;
* `wait_command` – max amount of time in seconds for getting previous command output;
* `no_colors` – disable colored output.
Or via environment variables:
* `THEFUCK_RULES` – list of enabled rules, like `DEFAULT:rm_root` or `sudo:no_command`;
* `THEFUCK_REQUIRE_CONFIRMATION` – require confirmation before running new command, `true/false`;
* `THEFUCK_WAIT_COMMAND` – max amount of time in seconds for getting previous command output;
* `THEFUCK_NO_COLORS` – disable colored output, `true/false`.
## Developing
Install `The Fuck` for development: