0

My Antergos terminal doesn’t show me any colors when executing scripts. I have a fresh instalation, with no tweaks. I have zsh and oh-my-zsh, but the configurations are the default ones. enter image description here

You can see that all the output is white, it should be colorful: enter image description here

This happen when I install programs, blanks spaces are text: enter image description here

Selectable text:

➜  ~  yaourt gnome-terminal 
1 extra/gnome-terminal 3.18.2-1 (gnome) [installed]
    The GNOME Terminal Emulator
2 aur/gnome-terminal-dark-variant 3.18.2-1 (10)
    The GNOME Terminal Emulator - Patched to bring back 'Use dark theme variant' option in preferences
3 aur/gnome-terminal-fedora 3.18.2-1 (31)
    The GNOME Terminal Emulator with Fedora patches
4 aur/gnome-terminal-git 3.15.91.5228.e5f7763-1 (2)
    The GNOME Terminal Emulator. Git Version
5 aur/neovim-gnome-terminal-wrapper 2-3 (0)
    A wrapper for running neovim in a separate instance of gnome-terminal
==> Introduzca el número de los paquetes desea instalar (ejemplos: 1 2 3 ó 1-3)
==> ---------------------------------------------------------------------------
==> 

I tried to customize the profiles, with no success, I tried a fresh instalation with the same ISO in my laptop with no problems, but I don't want to reinstall Antergos in this machine.

tput colors outputs 256

1 Answer 1

1

The problem appears to have been fixed, but the cause was a hardcoded check for the TERM environment variable equal to xterm. If (as indicated in the question) you had xterm-256color, then the check would fail.

You can see one of the diff's which is part of the change to fix this problem in the git repository, in this chunk of deleted lines:

-    /**
-     * Returns whether we are a terminal and have colour capabilities
-     *
-     * @return bool
-     */
-    private function isColorTerminal()
-    {
-        if (function_exists('posix_isatty')) {
-            $result = posix_isatty(STDOUT);
-        } else {
-            // See if STDOUT is a character device (S_IFCHR)
-            $stat = fstat(STDOUT);
-            $result = ($stat['mode'] & 0170000) === 0020000;
-        }
-
-        if (defined('PHP_WINDOWS_VERSION_BUILD') && $result) {
-            $result = false !== getenv('ANSICON')
-            || 'ON' === getenv('ConEmuANSI')
-            || 'xterm' === getenv('TERM');
-        }
-
-        return $result;
-    }
-

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.