File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -837,13 +837,17 @@ static auto configure_tty_mode(std::optional<bool> force_tty) {
837837 if (force_tty.has_value ()) {
838838 Config::set (" tty_mode" , force_tty.value ());
839839 Logger::debug (" TTY mode set via command line" );
840- }
840+ }
841+ else if (Config::getB (" force_tty" )) {
842+ Config::set (" tty_mode" , true );
843+ Logger::debug (" TTY mode set via config" );
844+ }
841845
842846#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
843847 else if (Term::current_tty.starts_with (" /dev/tty" )) {
844848 Config::set (" tty_mode" , true );
845849 Logger::debug (" Auto detect real TTY" );
846- }
850+ }
847851#endif
848852
849853 Logger::debug (" TTY mode enabled: {}" , Config::getB (" tty_mode" ));
Original file line number Diff line number Diff line change @@ -1455,9 +1455,13 @@ static int optionsMenu(const string& key) {
14551455 theme_refresh = true ;
14561456 Config::flip (" lowcolor" );
14571457 }
1458+ #if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
1459+ else if (option == " force_tty" and not Term::current_tty.starts_with (" /dev/tty" )) {
1460+ #else
14581461 else if (option == " force_tty" ) {
1462+ #endif
14591463 theme_refresh = true ;
1460- Config::flip (" tty_mode" );
1464+ Config::set (" tty_mode" , Config::getB ( " force_tty " ) );
14611465 }
14621466 else if (is_in (option, " rounded_corners" , " theme_background" ))
14631467 theme_refresh = true ;
You can’t perform that action at this time.
0 commit comments