mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-19 03:32:31 +01:00
Use spaces instead of tabs
The is more common in python and follows other rules usage.
This commit is contained in:
@@ -3,11 +3,12 @@
|
|||||||
# Example:
|
# Example:
|
||||||
# > java foo.java
|
# > java foo.java
|
||||||
# Error: Could not find or load main class foo.java
|
# Error: Could not find or load main class foo.java
|
||||||
#
|
|
||||||
|
|
||||||
def match(command, settings):
|
def match(command, settings):
|
||||||
return (command.script.startswith ('java ')
|
return (command.script.startswith('java ')
|
||||||
and command.script.endswith ('.java'))
|
and command.script.endswith('.java'))
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command, settings):
|
def get_new_command(command, settings):
|
||||||
return command.script[:-5]
|
return command.script[:-5]
|
||||||
|
@@ -4,12 +4,12 @@
|
|||||||
# > javac foo
|
# > javac foo
|
||||||
# error: Class names, 'foo', are only accepted if annotation
|
# error: Class names, 'foo', are only accepted if annotation
|
||||||
# processing is explicitly requested
|
# processing is explicitly requested
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
def match(command, settings):
|
def match(command, settings):
|
||||||
return (command.script.startswith ('javac ')
|
return (command.script.startswith('javac ')
|
||||||
and not command.script.endswith('.java'))
|
and not command.script.endswith('.java'))
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command, settings):
|
def get_new_command(command, settings):
|
||||||
return command.script + '.java'
|
return command.script + '.java'
|
||||||
|
@@ -4,12 +4,11 @@
|
|||||||
# > python foo
|
# > python foo
|
||||||
# error: python: can't open file 'foo': [Errno 2] No such file or directory
|
# error: python: can't open file 'foo': [Errno 2] No such file or directory
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
def match(command, settings):
|
def match(command, settings):
|
||||||
return (command.script.startswith ('python ')
|
return (command.script.startswith('python ')
|
||||||
and not command.script.endswith('.py'))
|
and not command.script.endswith('.py'))
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command, settings):
|
def get_new_command(command, settings):
|
||||||
return command.script + '.py'
|
return command.script + '.py'
|
||||||
|
Reference in New Issue
Block a user