Skip to content

Commit 1dea8ac

Browse files
azjezzfabpot
authored andcommitted
Add color support for Hyper terminal .
1 parent e8e59b7 commit 1dea8ac

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Output/StreamOutput.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ protected function hasColorSupport()
9898
&& @sapi_windows_vt100_support($this->stream))
9999
|| false !== getenv('ANSICON')
100100
|| 'ON' === getenv('ConEmuANSI')
101-
|| 'xterm' === getenv('TERM');
101+
|| 'xterm' === getenv('TERM')
102+
|| 'Hyper' === getenv('TERM_PROGRAM');
102103
}
103104

104105
if (function_exists('stream_isatty')) {

Style/SymfonyStyle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function createProgressBar($max = 0)
271271
{
272272
$progressBar = parent::createProgressBar($max);
273273

274-
if ('\\' !== DIRECTORY_SEPARATOR) {
274+
if ('\\' !== DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
275275
$progressBar->setEmptyBarCharacter(''); // light shade character \u2591
276276
$progressBar->setProgressCharacter('');
277277
$progressBar->setBarCharacter(''); // dark shade character \u2593

0 commit comments

Comments
 (0)