READLINE_LIKE completer not completing
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Run the supplied prompt() example with WordCompleter, CompleteStyle.READLINE_LIKE, and bottom_toolbar to reproduce both behaviors. Start by tracing the READLINE_LIKE completion path and the toolbar redraw handling; done means completion continues after the common prefix, suggestions appear while typing, and the toolbar remains at the bottom.
Written by the indexing model from the issue text.
Description
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.
#!/usr/bin/env python
from prompt_toolkit.completion import WordCompleter
from prompt_toolkit.shortcuts import CompleteStyle, prompt
test_completer = WordCompleter(['<html>', '<body>', '<head>', '<title>'])
prompt_params = {}
prompt_params['completer'] = test_completer
prompt_params['complete_style'] = CompleteStyle.READLINE_LIKE
prompt_params['bottom_toolbar'] = "should only appear at the bottom"
while True:
prompt(**prompt_params)
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prompt-toolkit/python-prompt-toolkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
prompt-toolkit/python-prompt-toolkit#2073 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
prompt-toolkit/python-prompt-toolkit#1154 · 1 comment ·
All issues in prompt-toolkit/python-prompt-toolkit
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·