Skip to content

TheLarkInn/is-interactive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-interactive

Rust adaptation of sindresorhus/is-interactive from NodeJS

Check if stdout or stderr is interactive

It checks that stedout or stderr is TTY, not a dumb terminal, and not running in a CI.

This can be useful to decide whether to present interactive UI or animations in the terminal.

Install

$ cargo add is-interactive

Usage

use is_interactive::is_interactive;

fn main() {
  if is_interactive() {
    // show beautiful animations 
  } else {
    // skip boring animations
  };
}

About

Rust adaptation of sindresorhus/is-interactive from NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages