2015-08-26 12:12:52 +03:00
|
|
|
from pathlib import Path
|
2015-04-25 02:35:26 +02:00
|
|
|
from thefuck import types
|
2015-05-06 13:57:09 +02:00
|
|
|
from thefuck.conf import DEFAULT_PRIORITY
|
2015-04-25 02:35:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
def Command(script='', stdout='', stderr=''):
|
|
|
|
return types.Command(script, stdout, stderr)
|
|
|
|
|
|
|
|
|
|
|
|
def Rule(name='', match=lambda *_: True,
|
|
|
|
get_new_command=lambda *_: '',
|
2015-05-01 04:39:37 +02:00
|
|
|
enabled_by_default=True,
|
2015-05-06 13:57:09 +02:00
|
|
|
side_effect=None,
|
2015-07-25 23:04:08 +02:00
|
|
|
priority=DEFAULT_PRIORITY,
|
|
|
|
requires_output=True):
|
2015-05-01 04:39:37 +02:00
|
|
|
return types.Rule(name, match, get_new_command,
|
2015-05-06 13:57:09 +02:00
|
|
|
enabled_by_default, side_effect,
|
2015-07-25 23:04:08 +02:00
|
|
|
priority, requires_output)
|
2015-08-01 19:16:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
def CorrectedCommand(script='', side_effect=None, priority=DEFAULT_PRIORITY):
|
|
|
|
return types.CorrectedCommand(script, side_effect, priority)
|
2015-08-26 12:12:52 +03:00
|
|
|
|
|
|
|
|
|
|
|
root = Path(__file__).parent.parent.resolve()
|