mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 09:39:01 +00:00
add a rule to run the script you enter by add './' in command's prefix
This commit is contained in:
parent
ef20a68d56
commit
2b08a136b5
9
thefuck/rules/has_exists_script.py
Normal file
9
thefuck/rules/has_exists_script.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
def match(command, settings):
|
||||||
|
exist = os.path.exists(command.script)
|
||||||
|
return exist
|
||||||
|
|
||||||
|
def get_new_command(command, settings):
|
||||||
|
return './{}'.format(command.script)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user