Skip to content

Colorize commands in the REPL #151822

Closed
Closed

Description

@johnslavik

Feature or enhancement

clear was not colorized in the REPL, but it shares the same special meaning as exit, quit, copyright, and help (commands you type without parentheses to trigger an action). Those other commands happened to be colorized already, but only because they double as site builtins, not because the REPL recognized them as commands. clear has no such builtin counterpart, so it fell through uncolored. This change introduces a dedicated command color and applies it consistently to all five.

Let's consider making a separate matcher for commands specifically, and colorize all commands, including clear. This will highlight commands differently than built-ins.

If this sounds good, lmk if you have any color preferences. I'm fine with bold cyan.

cc @ambv @pablogsal

Linked PRs

Activity

  1. self-assigned this
    on Jun 20, 2026
  2. added
    type-featureA feature request or enhancement
    topic-replRelated to the interactive shell
    stdlibStandard Library Python modules in the Lib/ directory
    on Jun 20, 2026
  3. added a commit that references this issue on Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions