Skip to content

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 13, 2021
1 parent 3e8f38d commit 46c3389
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ 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.contains("WezTerm"))
}

impl TerminalCapabilities {
Expand Down

0 comments on commit 46c3389

Please sign in to comment.