auto_interactive

Function auto_interactive 

Source
pub fn auto_interactive<S: System>(system: &S, run: &Run) -> bool
Expand description

Tests whether the shell should be implicitly interactive.

As per POSIX, “if the shell reads commands from the standard input and the shell’s standard input and standard error are attached to a terminal, the shell is considered to be interactive.” This function implements this rule.

This function returns false if the interactive option is explicitly specified in the command line arguments to honor the user’s intent.