Open rinxor opened 3 years ago
I am able to reproduce. Launch @rinxor's script and press Tab twice. It will re-display the bottom_toolbar
above the readline completions.
Then press h and Tab, no candidates will be show:
Not only the READLINE_LIKE
completer has such problem. The default CompleteStyle.COLUMN
can't show candidates after typing <h either.
Running this script provided in official doc https://python-prompt-toolkit.readthedocs.io/en/stable/pages/asking_for_input.html#autocompletion
from prompt_toolkit import prompt
from prompt_toolkit.completion import WordCompleter
html_completer = WordCompleter(['<html>', '<body>', '<head>', '<title>'])
text = prompt('Enter HTML: ', completer=html_completer)
print('You said: %s' % text)
Using a READLINE_LIKE completer doesn't function as expected. When there is a common prefix it will fill it in (e.g. '<' in the example code) but it will not tab complete any further than that or display suggestions when typing more than '<'.
Another minor bug with READLINE_LIKE completer is using a bottom toolbar is redisplaying it above the readline completions every time you press tab.