boil out history

This commit is contained in:
chrys 2016-10-06 07:42:06 +02:00
parent 317dd303b7
commit da7d2dda62

View File

@ -34,12 +34,12 @@ class command():
else: else:
currPrompt = currLine.find('$') currPrompt = currLine.find('$')
rootPrompt = currLine.find('#') rootPrompt = currLine.find('#')
if currPrompt == 0: if currPrompt <= 0:
if rootPrompt != 0: if rootPrompt > 0:
currPrompt = rootPrompt currPrompt = rootPrompt
else: else:
announce = currLine announce = currLine
if currPrompt != 0: if currPrompt > 0:
remove_digits = str.maketrans('0123456789', ' ') remove_digits = str.maketrans('0123456789', ' ')
if prevLine[:currPrompt].translate(remove_digits) == currLine[:currPrompt].translate(remove_digits): if prevLine[:currPrompt].translate(remove_digits) == currLine[:currPrompt].translate(remove_digits):
announce = currLine[currPrompt+1:] announce = currLine[currPrompt+1:]