You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current completion logic in Lib/_pyrepl/completing_reader.py uses a suffix-insertion strategy (source code):
In the contrast, Readline completely replaces user input with the candidate (source code).
This will lead to unwanted behavior in case-insensitive completion scenario. If user input 'xy', they might get 'xyZZY' instead of the expected 'XYZZY'.
Bug report
Bug description:
The current completion logic in
Lib/_pyrepl/completing_reader.pyuses a suffix-insertion strategy (source code):In the contrast, Readline completely replaces user input with the candidate (source code).
This will lead to unwanted behavior in case-insensitive completion scenario. If user input 'xy', they might get 'xyZZY' instead of the expected 'XYZZY'.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
_pyreplcompletion to replace input stem instead of appending #145393