-
-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the TERM_PROGRAM
environment variable
#1837
Comments
This isn't as necessary, since ConEmu already sets quite a number of unique environment variables to expose various configuration. You could simply check for the presence of those, or try executing Following conventions is good though to prevent special-casing. |
That is not true. I've checked three terminals on Ubuntu, and only one defines this variable. And it's vscode :) |
I'm not against the unification, but does it make sense? BTW, many terminals set |
And |
I'm in doubt, really... I decides not to spawn more environment than we have already. But! You may add |
@Maximus5 You're right. As you said, the support for this variable seems to be limited mainly to macOS and cross platform terminals (e.g. Hyper). Terminals in support of
|
name | value | request 2 |
---|---|---|
macOS Terminal | Apple_Terminal |
|
iTerm2 | iTerm.app |
|
Hyper 3 | Hyper (formerly HyperTerm ) |
link |
Terminus 3 | Terminus |
link |
FluentTerminal 3 | FluentTerminal |
link |
VS Code's integrated terminal | vscode |
link |
1 Until recently, Terminus set the variable Terminus=1
instead of TERM_PROGRAM=Terminus
(Eugeny/tabby#702)
2 Most of the terminals above did not implement the TERM_PROGRAM
variable until someone asked (the request
column)
3 Furthermore, FluentTerminal sets TERM=xterm
variable. Hyper and Terminus sets TERM=xterm-256color
.
Respectively, the macOS terminal has always used TERM_PROGRAM=Apple_Terminal
in their implementation.
Benefits
- although not a standard, many terminal emulators on macOS implement this
- it's used by Yarn and neofetch to detect the terminal
- it's a quick and easy way to find the type of terminal from shell scripts (e.g. to be used here Add ConEmu-specific escape codes sindresorhus/ansi-escapes#7)
Terminals that do not provide TERM_PROGRAM
Rejections
- mintty: argue that "such variables [...] are not only set in the child shells but also in any other terminal started from them." – Support TERM_PROGRAM environment variables mintty/mintty#776 (comment)
- alacritty – dismissed as a non-standard feature
Not-implemented
- FluentTerminal – Another xterm.js-based terminal, pending discussion: Should
TERM_PROGRAM
be set? felixse/FluentTerminal#222
Unknown/Un-tested
- Terminator – The GNOME's terminal emulator (Ubuntu, CentOS Linux and FreeBSD)
- Terminology – Another terminal emulator for Linux and BSD
- Termite – A terminal emulator for GTK+ (Linux, *NIX)
Programs that check TERM_PROGRAM
- Yarn: uses
TERM_PROGRAM
to display emojis on Hyper and macOS terminals. (impl) - neofetch: uses
TERM_PROGRAM
to identify the terminal emulator program (impl) - neovim: uses
TERM_PROGRAM
to to address terminal emulator capabilities and bugs (impl) - …and more
TL;DR: This is mainly a macOS-centric variable, and seldom terminals outside macOS set it; often if the program is cross-platform and/or a user has asked for it.
Description Feature Request
On Linux and macOS, the
TERM_PROGRAM
variable is set to the terminal name (e.g.Hyper
,Apple_Terminal
, etc).Would it be possible (and appropriate) for ConEmu to follow the convention and set
%TERM_PROGRAM%
to something likeConEmu
?Purpose
The text was updated successfully, but these errors were encountered: