diff --git a/Cargo.toml b/Cargo.toml index 4ede8d9a6..c77688e87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -68,6 +68,7 @@ with-file-history = ["fd-lock"] with-sqlite-history = ["rusqlite"] with-fuzzy = ["skim"] case_insensitive_history_search = ["regex"] +openmpi = [] [[example]] name = "custom_key_bindings" diff --git a/src/tty/unix.rs b/src/tty/unix.rs index 75dace14a..d02454c4d 100644 --- a/src/tty/unix.rs +++ b/src/tty/unix.rs @@ -73,6 +73,13 @@ fn get_win_size(fd: RawFd) -> (usize, usize) { /// Check TERM environment variable to see if current term is in our /// unsupported list fn is_unsupported_term() -> bool { + #[cfg(feature = "openmpi")] + { + if std::env::var("OMPI_COMM_WORLD_SIZE").is_ok() { + return true; + } + } + match std::env::var("TERM") { Ok(term) => { for iter in &UNSUPPORTED_TERM {