Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Use TERM_PROGRAM for determining WezTerm terminal
Browse files Browse the repository at this point in the history
Currently, `TERM` is used, which is not set by default.
  • Loading branch information
MuhammedZakir committed Jul 14, 2021
1 parent 3e8f38d commit 6246bdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,11 @@ To publish a new release run `scripts/release` from the project directory.

## [Unreleased]

### Changed
- Use `TERM_PROGRAM` for determining WezTerm terminal (see [GH-185]).

[GH-185]: https://github.com/lunaryorn/mdcat/pull/185

## [0.23.0] – 2021-07-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/terminal.rs
Expand Up @@ -82,7 +82,7 @@ fn get_vte_version() -> Option<(u8, u8)> {

/// Checks if the current terminal is WezTerm.
fn is_wezterm() -> bool {
std::env::var("TERM").map_or(false, |value| value == "wezterm")
std::env::var("TERM_PROGRAM").map_or(false, |value| value == "WezTerm")
}

impl TerminalCapabilities {
Expand Down

0 comments on commit 6246bdb

Please sign in to comment.