Add color support for Hyper terminal .
This commit is contained in:
parent
be8feaf6e3
commit
2ab7bcf797
@ -231,7 +231,8 @@ class DeprecationErrorHandler
|
||||
&& sapi_windows_vt100_support(STDOUT))
|
||||
|| false !== getenv('ANSICON')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM');
|
||||
|| 'xterm' === getenv('TERM')
|
||||
|| 'Hyper' === getenv('TERM_PROGRAM');
|
||||
}
|
||||
|
||||
if (function_exists('stream_isatty')) {
|
||||
|
@ -98,7 +98,8 @@ class StreamOutput extends Output
|
||||
&& @sapi_windows_vt100_support($this->stream))
|
||||
|| false !== getenv('ANSICON')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM');
|
||||
|| 'xterm' === getenv('TERM')
|
||||
|| 'Hyper' === getenv('TERM_PROGRAM');
|
||||
}
|
||||
|
||||
if (function_exists('stream_isatty')) {
|
||||
|
@ -271,7 +271,7 @@ class SymfonyStyle extends OutputStyle
|
||||
{
|
||||
$progressBar = parent::createProgressBar($max);
|
||||
|
||||
if ('\\' !== DIRECTORY_SEPARATOR) {
|
||||
if ('\\' !== DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
|
||||
$progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
|
||||
$progressBar->setProgressCharacter('');
|
||||
$progressBar->setBarCharacter('▓'); // dark shade character \u2593
|
||||
|
@ -484,7 +484,8 @@ class CliDumper extends AbstractDumper
|
||||
&& @sapi_windows_vt100_support($stream))
|
||||
|| false !== getenv('ANSICON')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM');
|
||||
|| 'xterm' === getenv('TERM')
|
||||
|| 'Hyper' === getenv('TERM_PROGRAM');
|
||||
}
|
||||
|
||||
if (function_exists('stream_isatty')) {
|
||||
@ -513,7 +514,8 @@ class CliDumper extends AbstractDumper
|
||||
{
|
||||
$result = 183 <= getenv('ANSICON_VER')
|
||||
|| 'ON' === getenv('ConEmuANSI')
|
||||
|| 'xterm' === getenv('TERM');
|
||||
|| 'xterm' === getenv('TERM')
|
||||
|| 'Hyper' === getenv('TERM_PROGRAM');
|
||||
|
||||
if (!$result && PHP_VERSION_ID >= 70200) {
|
||||
$version = sprintf(
|
||||
|
Reference in New Issue
Block a user