mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 09:39:01 +00:00
Merge 7fe4c309a764d31ae219f9c489e5823c2c45a405 into c7e7e1d884d3bb241ea6448f72a989434c2a35ec
This commit is contained in:
commit
51017d9a47
@ -3,10 +3,9 @@ from thefuck.shells import shell
|
|||||||
|
|
||||||
|
|
||||||
def match(command):
|
def match(command):
|
||||||
return (command.script.startswith('./')
|
return ('permission denied' in command.output.lower()
|
||||||
and 'permission denied' in command.output.lower()
|
and os.path.exists(os.path.expanduser(command.script_parts[0]))
|
||||||
and os.path.exists(command.script_parts[0])
|
and not os.access(os.path.expanduser(command.script_parts[0]), os.X_OK))
|
||||||
and not os.access(command.script_parts[0], os.X_OK))
|
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user