Feature Request: Add ability to detect when running in terminal #3473

Open
opened 2026-01-30 23:22:09 +00:00 by claunia · 0 comments
Owner

Originally created by @avylove on GitHub (Aug 18, 2019).

Description of the new feature/enhancement

There doesn't seem to be an obvious way to detect when running from the terminal. This is a issue for applications and libraries where behavior is dependent on the terminal. For example, a Python library may require colorama for some terminals and not others.

Proposed technical implementation details

The most common and portable way to do this is to set the TERM environment variable when initializing the terminal.

Originally created by @avylove on GitHub (Aug 18, 2019). # Description of the new feature/enhancement There doesn't seem to be an obvious way to detect when running from the terminal. This is a issue for applications and libraries where behavior is dependent on the terminal. For example, a Python library may require colorama for some terminals and not others. # Proposed technical implementation details The most common and portable way to do this is to set the TERM environment variable when initializing the terminal.
claunia added the Issue-FeatureNeeds-TriageResolution-Duplicate labels 2026-01-30 23:22:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3473