mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-22 12:58:33 +00:00
Merge pull request #605 from andrew-epstein/master
Improve performance of history rule
This commit is contained in:
commit
91c27e1a62
@ -264,7 +264,7 @@ def get_valid_history_without_current(command):
|
|||||||
from thefuck.shells import shell
|
from thefuck.shells import shell
|
||||||
history = shell.get_history()
|
history = shell.get_history()
|
||||||
tf_alias = get_alias()
|
tf_alias = get_alias()
|
||||||
executables = get_all_executables()
|
executables = set(get_all_executables())
|
||||||
return [line for line in _not_corrected(history, tf_alias)
|
return [line for line in _not_corrected(history, tf_alias)
|
||||||
if not line.startswith(tf_alias) and not line == command.script
|
if not line.startswith(tf_alias) and not line == command.script
|
||||||
and line.split(' ')[0] in executables]
|
and line.split(' ')[0] in executables]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user