1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 20:11:17 +00:00

#682: Warn if PS1 changed after thefuck initialization

This commit is contained in:
Vladimir Iakovlev 2017-08-30 07:44:58 +02:00
parent db12211e05
commit 1f1b7da6f4

View File

@ -69,6 +69,11 @@ def get_output(script):
warn("Output log isn't specified")
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:
with open(os.environ['THEFUCK_OUTPUT_LOG'], 'rb') as log_file:
lines = _get_output_lines(script, log_file)