def enhance_colors_for_cmd_exe(self): """ Enhance colors when using cmd.exe on windows. When using the default style all blue and dark red colors are changed to CYAN and intence red. """ env = builtins.__xonsh_env__ # Ensure we are not using ConEmu if 'CONEMUANSI' not in env: # Auto suggest needs to be a darker shade to be distinguishable # from the default color self.styles[Token.AutoSuggestion] = '#444444' self._smap.update(expand_gray_colors_for_cmd_exe(self._smap)) if env.get('INTENSIFY_COLORS_ON_WIN', False): self._smap.update(intensify_colors_for_cmd_exe(self._smap))
def enhance_colors_for_cmd_exe(self): """ Enhance colors when using cmd.exe on windows. When using the default style all blue and dark red colors are changed to CYAN and intense red. """ env = builtins.__xonsh__.env # Ensure we are not using ConEmu or Visual Stuio Code if "CONEMUANSI" in env or "VSCODE_PID" in env: return if env.get("INTENSIFY_COLORS_ON_WIN", False): if win_ansi_support(): newcolors = hardcode_colors_for_win10(self.styles) else: newcolors = intensify_colors_for_cmd_exe(self.styles) self.trap.update(newcolors)
def enhance_colors_for_cmd_exe(self): """ Enhance colors when using cmd.exe on windows. When using the default style all blue and dark red colors are changed to CYAN and intense red. """ env = builtins.__xonsh__.env # Ensure we are not using the new Windows Terminal, ConEmu or Visual Stuio Code if "WT_SESSION" in env or "CONEMUANSI" in env or "VSCODE_PID" in env: return if env.get("INTENSIFY_COLORS_ON_WIN", False): if win_ansi_support(): newcolors = hardcode_colors_for_win10(self.styles) else: newcolors = intensify_colors_for_cmd_exe(self.styles) self.trap.update(newcolors)
def enhance_colors_for_cmd_exe(self): """ Enhance colors when using cmd.exe on windows. When using the default style all blue and dark red colors are changed to CYAN and intence red. """ env = builtins.__xonsh_env__ # Ensure we are not using ConEmu if "CONEMUANSI" not in env: if not hasattr(pygments.style, "ansicolors"): # Auto suggest needs to be a darker shade to be distinguishable # from the default color self.styles[Token.AutoSuggestion] = "#444444" self._smap.update(expand_gray_colors_for_cmd_exe(self._smap)) if env.get("INTENSIFY_COLORS_ON_WIN", False): has_ansi = hasattr(pygments.style, "ansicolors") newcolors = intensify_colors_for_cmd_exe(self._smap, ansi=has_ansi) self._smap.update(newcolors)