flake_edit/
tui.rs

1use std::io::{self, IsTerminal};
2
3pub mod app;
4mod backend;
5pub mod completions;
6pub mod components;
7mod helpers;
8mod run;
9mod style;
10mod view;
11pub mod workflow;
12
13pub use crate::cache::CacheConfig;
14pub use app::App;
15pub use run::run;
16pub use workflow::{AppResult, ConfirmResultAction, MultiSelectResultData, SingleSelectResult};
17
18pub fn is_interactive(non_interactive_flag: bool) -> bool {
19    if non_interactive_flag {
20        return false;
21    }
22    if std::env::var("CI").is_ok() {
23        return false;
24    }
25    io::stdout().is_terminal()
26}