mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 15:12:20 +00:00 
			
		
		
		
	Update readme
This commit is contained in:
		| @@ -245,18 +245,18 @@ and optional `enabled_by_default`, `requires_output` and `priority` variables. | ||||
| Simple example of the rule for running script with `sudo`: | ||||
|  | ||||
| ```python | ||||
| def match(command, settings): | ||||
| def match(command): | ||||
|     return ('permission denied' in command.stderr.lower() | ||||
|             or 'EACCES' in command.stderr) | ||||
|  | ||||
|  | ||||
| def get_new_command(command, settings): | ||||
| def get_new_command(command): | ||||
|     return 'sudo {}'.format(command.script) | ||||
|  | ||||
| # Optional: | ||||
| enabled_by_default = True | ||||
|  | ||||
| def side_effect(command, settings): | ||||
| def side_effect(command, fixed_command): | ||||
|     subprocess.call('chmod 777 .', shell=True) | ||||
|  | ||||
| priority = 1000  # Lower first, default is 1000 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user