Open mmatthebi opened 3 years ago
A problem I encountered (probably caused by missing sentence=True
in NestedCompleter
too) is that, in addition to not completing after the first non-letter character, it shows wrong completions.
for example, consider this dict
{
'/an-option': {'on', 'off'},
'an-strange-option': {'yes', 'no'},
'another-option': {'some', 'nested', 'option'}
}
writing /
on prompt will show /an-option
as expected...
but writing /an
do not show /an-option
and shows instead an-strange
and another
, and this does not occur in WordCompleter when called with sentence=True
.
Given a complete dict like
for
NestedCompleter
does not allow completing after typinga b.
, because theWordCompleter
forb.
doesn't usesentence=True
.Is it possible to have
sentence=True
as a default or a configuration option?https://github.com/prompt-toolkit/python-prompt-toolkit/blob/b76946c3d046dfa0a00fee6c393ba1c936f5a435/prompt_toolkit/completion/nested.py#L106