Function mdcat::detect_terminal[][src]

pub fn detect_terminal() -> Box<Terminal<TerminalWrite = Stdout>>

Detect the terminal on stdout.

If stdout links to a TTY look at different pieces of information, in particular environment variables set by terminal emulators, to figure out what terminal emulator we run in.

If stdout does not link to a TTY assume a Dumb terminal which cannot format anything.