summaryrefslogtreecommitdiff
path: root/AutoCompleter.py
diff options
context:
space:
mode:
Diffstat (limited to 'AutoCompleter.py')
-rwxr-xr-xAutoCompleter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/AutoCompleter.py b/AutoCompleter.py
index 83228b3b..671195c9 100755
--- a/AutoCompleter.py
+++ b/AutoCompleter.py
@@ -488,8 +488,10 @@ class AutoCompleter(object):
out_str += '\n{0: <{width}}'.format('', width=pref_len).join(help_lines)
print('\nHint:' + out_str + '\n')
- from cmd2 import readline_lib
- readline_lib.rl_forced_update_display()
+ # Moving this import here improves the performance when using AutoCompleter in a
+ # bash completion function. Loading cmd2 results in a lag of about half a second to a second.
+ from cmd2 import reprint_prompt
+ reprint_prompt()
# noinspection PyUnusedLocal
@staticmethod