mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-21 20:38:54 +00:00
Use spaces instead of tabs
This is more common in python and follows other rules usage.
This commit is contained in:
parent
3203d57b36
commit
01ce65047a
@ -1,24 +1,23 @@
|
|||||||
# Opens URL's in the default web browser
|
# Opens URL's in the default web browser
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# > open github.com
|
# > open github.com
|
||||||
# The file ~/github.com does not exist.
|
# The file ~/github.com does not exist.
|
||||||
# Perhaps you meant 'http://github.com'?
|
# Perhaps you meant 'http://github.com'?
|
||||||
#
|
#
|
||||||
#
|
|
||||||
|
|
||||||
def match(command, settings):
|
def match(command, settings):
|
||||||
return (command.script.startswith ('open')
|
return (command.script.startswith('open')
|
||||||
and (
|
and (
|
||||||
# Wanted to use this:
|
'.com' in command.script
|
||||||
# 'http' in command.stderr
|
or '.net' in command.script
|
||||||
'.com' in command.script
|
or '.org' in command.script
|
||||||
or '.net' in command.script
|
or '.ly' in command.script
|
||||||
or '.org' in command.script
|
or '.io' in command.script
|
||||||
or '.ly' in command.script
|
or '.se' in command.script
|
||||||
or '.io' in command.script
|
or '.edu' in command.script))
|
||||||
or '.se' in command.script
|
|
||||||
or '.edu' in command.script))
|
|
||||||
|
|
||||||
def get_new_command(command, settings):
|
def get_new_command(command, settings):
|
||||||
return 'open http://' + command.script[5:]
|
return 'open http://' + command.script[5:]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user