-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
Colorize commands in the REPL #151822
Copy link
Copy link
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement
Fields
Give feedbackNo fields configured for issues without a type.
Feature or enhancement
clearwas not colorized in the REPL, but it shares the same special meaning asexit,quit,copyright, andhelp(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.clearhas 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