File tree Expand file tree Collapse file tree
crates/anstyle-progress/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ pub fn supports_term_progress(is_terminal: bool) -> bool {
44 return false ;
55 }
66
7- // https://github.com/microsoft/terminal/pull/8055
8- if std :: env :: var ( "WT_SESSION" ) . is_ok ( ) {
9- return true ;
10- }
11-
12- // https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC
13- if std :: env :: var ( "ConEmuANSI" ) . ok ( ) == Some ( "ON" . into ( ) ) {
7+ // Terminal feature detection, includes
8+ // - iTerm support in v3.6.6
9+ let term_features = std :: env :: var ( "TERM_FEATURES" )
10+ . ok ( )
11+ . map ( |v| term_features_has_progress ( & v ) )
12+ . unwrap_or ( false ) ;
13+ if term_features {
1414 return true ;
1515 }
1616
@@ -21,13 +21,13 @@ pub fn supports_term_progress(is_terminal: bool) -> bool {
2121 return true ;
2222 }
2323
24- // Terminal feature detection, includes
25- // - iTerm support in v3.6.6
26- let term_features = std :: env :: var ( "TERM_FEATURES" )
27- . ok ( )
28- . map ( |v| term_features_has_progress ( & v ) )
29- . unwrap_or ( false ) ;
30- if term_features {
24+ // https://github.com/microsoft/terminal/pull/8055
25+ if std :: env :: var ( "WT_SESSION" ) . is_ok ( ) {
26+ return true ;
27+ }
28+
29+ // https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC
30+ if std :: env :: var ( "ConEmuANSI" ) . ok ( ) == Some ( "ON" . into ( ) ) {
3131 return true ;
3232 }
3333
You can’t perform that action at this time.
0 commit comments