#682: Warn if PS1 changed after thefuck initialization
This commit is contained in:
@@ -69,6 +69,11 @@ def get_output(script):
|
|||||||
warn("Output log isn't specified")
|
warn("Output log isn't specified")
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
if const.USER_COMMAND_MARK not in os.environ.get('PS1', ''):
|
||||||
|
warn("PS1 doesn't contain user command mark, please ensure "
|
||||||
|
"that PS1 is not changed after The Fuck alias initialization")
|
||||||
|
return None, None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(os.environ['THEFUCK_OUTPUT_LOG'], 'rb') as log_file:
|
with open(os.environ['THEFUCK_OUTPUT_LOG'], 'rb') as log_file:
|
||||||
lines = _get_output_lines(script, log_file)
|
lines = _get_output_lines(script, log_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user