pub fn detect(var: impl Fn(&str) -> Option<String>) -> Result<Env>
Works out what this terminal can do. Must run in raw mode, before input is read.