Skip to content

PyREPL: Different Completion Behavior Between with GNU Readline #145392

@tanloong

Description

@tanloong

Bug report

Bug description:

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'.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions