fix utils.py

This commit is contained in:
DashBing 2023-08-20 17:12:40 +08:00
parent 5bf7e58a3b
commit f6c3800dfe
No known key found for this signature in database
GPG Key ID: D6ABB0FFF55D5230

View File

@ -327,9 +327,11 @@ def get_valid_history_without_current(command):
executables = set(get_all_executables())\
.union(shell.get_builtin_commands())
return [line for line in _not_corrected(history, tf_alias)
if not line.startswith(tf_alias) and not line == command.script
and line.split(' ')[0] in executables]
return [
line for line in _not_corrected(history, tf_alias)
if not line.startswith(tf_alias) and not line == command.script
and line.split(' ')[0] in executables
]
def format_raw_script(raw_script):