mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 11:35:45 +00:00
17 lines
479 B
Rust
17 lines
479 B
Rust
use once_cell::sync::OnceCell;
|
|
|
|
/// Whether to enable accessible output (removes info output and reduces other
|
|
/// output, removes visual markers like '[' and ']').
|
|
/// Removes th progress bar as well
|
|
pub static ACCESSIBLE: OnceCell<bool> = OnceCell::new();
|
|
|
|
pub fn is_running_in_accessible_mode() -> bool {
|
|
ACCESSIBLE.get().copied().unwrap_or(false)
|
|
}
|
|
|
|
pub fn set_accessible(value: bool) {
|
|
if ACCESSIBLE.get().is_none() {
|
|
ACCESSIBLE.set(value).unwrap();
|
|
}
|
|
}
|