mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-18 19:22:32 +01:00
#154 Add priority to rules
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from thefuck import types
|
||||
from thefuck.conf import DEFAULT_PRIORITY
|
||||
|
||||
|
||||
def Command(script='', stdout='', stderr=''):
|
||||
@@ -8,6 +9,8 @@ def Command(script='', stdout='', stderr=''):
|
||||
def Rule(name='', match=lambda *_: True,
|
||||
get_new_command=lambda *_: '',
|
||||
enabled_by_default=True,
|
||||
side_effect=None):
|
||||
side_effect=None,
|
||||
priority=DEFAULT_PRIORITY):
|
||||
return types.Rule(name, match, get_new_command,
|
||||
enabled_by_default, side_effect)
|
||||
enabled_by_default, side_effect,
|
||||
priority)
|
||||
|
Reference in New Issue
Block a user