Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #2425: autocomplete garbage if show-all-if-ambiguous is On #2426

Merged

Conversation

spnethw
Copy link
Contributor

@spnethw spnethw commented Oct 8, 2024

fix #2425

Согласно readline(3):

show-all-if-ambiguous (Off)

This alters the default behavior of the completion functions. If set to On, words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell.

show-all-if-unmodified (Off)

This alters the default behavior of the completion functions in a fashion similar to show-all-if-ambiguous. If set to On, words which have more than one possible completion without any possible partial completion (the possible completions don't share a common prefix) cause the matches to be listed immediately instead of ringing the bell.

Код far2l не рассчитан на работу с такими настройками. Метод VTCompletor::ExpandCommand() посылает один <Tab> и ожидает, максимум, автодополнения команды до точки, где есть неоднозначность (а не весь возможный список сразу). В случае VTCompletor::GetPossibilities() ситуация похожая, там <Tab> посылается дважды, результатом чего будет список с дубликатами.

@elfmz elfmz merged commit 9213744 into elfmz:master Oct 13, 2024
9 checks passed
@spnethw spnethw deleted the fix_autocomplete_garbage_show_all_if_ambiguous branch October 13, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocomplete: garbage in the command line if show-all-if-ambiguous / show-all-if-unmodified is On
2 participants