1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-20 20:09:07 +00:00

#394: Force history_limit to be int

This commit is contained in:
nvbn 2015-10-30 16:23:19 +08:00
parent 8c8abca8d5
commit 2fea0d4c60
2 changed files with 4 additions and 1 deletions

View File

@ -280,7 +280,8 @@ The Fuck has a few settings parameters which can be changed in `$XDG_CONFIG_HOME
* `wait_command` – max amount of time in seconds for getting previous command output;
* `no_colors` – disable colored output;
* `priority` – dict with rules priorities, rule with lower `priority` will be matched first;
* `debug` – enables debug output, by default `False`.
* `debug` – enables debug output, by default `False`;
* `history_limit` &ndash numeric value of how many history commands will be scanned, like `2000`;
Example of `settings.py`:

View File

@ -128,6 +128,8 @@ class Settings(dict):
return int(val)
elif attr in ('require_confirmation', 'no_colors', 'debug'):
return val.lower() == 'true'
elif attr == 'history_limit':
return int(val)
else:
return val