Console : allow to know if the TTY is enabled (or if the console is called from pipe)

This commit is contained in:
2022-03-18 11:08:47 +01:00
parent c4031b71f8
commit ffd75a57d4

View File

@@ -993,6 +993,13 @@ class Console
}
// }}}
/** Return true if the TTY is enabled, or false if the program is called from pipe
*/
public function isTTY()
{
return !! $this->initSttyState;
}
/** Tokenize the provided line and aggragate if there is single or double
* quotes.
* Trim the spaces