1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-31 02:01:13 +00:00

#313 Add new command options to readme

This commit is contained in:
nvbn 2015-07-27 17:39:52 +03:00
parent cf82af8978
commit 3f6652df66

View File

@ -214,8 +214,8 @@ get_new_command(command: Command, settings: Settings) -> str
``` ```
Also the rule can contain an optional function Also the rule can contain an optional function
`side_effect(command: Command, settings: Settings) -> None` and an `side_effect(command: Command, settings: Settings) -> None` and
optional boolean `enabled_by_default`. optional `enabled_by_default`, `requires_output` and `priority` variables.
`Command` has three attributes: `script`, `stdout` and `stderr`. `Command` has three attributes: `script`, `stdout` and `stderr`.
@ -239,6 +239,8 @@ def side_effect(command, settings):
subprocess.call('chmod 777 .', shell=True) subprocess.call('chmod 777 .', shell=True)
priority = 1000 # Lower first, default is 1000 priority = 1000 # Lower first, default is 1000
requires_output = True
``` ```
[More examples of rules](https://github.com/nvbn/thefuck/tree/master/thefuck/rules), [More examples of rules](https://github.com/nvbn/thefuck/tree/master/thefuck/rules),