mirror of
https://github.com/nvbn/thefuck.git
synced 2025-04-13 06:10:46 +01:00
#682: Update readme
This commit is contained in:
parent
4625d8503d
commit
452ac21603
@ -306,7 +306,7 @@ side_effect(old_command: Command, fixed_command: str) -> None
|
|||||||
```
|
```
|
||||||
and optional `enabled_by_default`, `requires_output` and `priority` variables.
|
and optional `enabled_by_default`, `requires_output` and `priority` variables.
|
||||||
|
|
||||||
`Command` has four attributes: `script`, `stdout`, `stderr` and `script_parts`.
|
`Command` has three attributes: `script`, `output` and `script_parts`.
|
||||||
Rule shouldn't change `Command`.
|
Rule shouldn't change `Command`.
|
||||||
|
|
||||||
|
|
||||||
@ -317,8 +317,8 @@ Simple example of the rule for running script with `sudo`:
|
|||||||
|
|
||||||
```python
|
```python
|
||||||
def match(command):
|
def match(command):
|
||||||
return ('permission denied' in command.stderr.lower()
|
return ('permission denied' in command.output.lower()
|
||||||
or 'EACCES' in command.stderr)
|
or 'EACCES' in command.output)
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user