예제 #1
0
 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))
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
파일: pyghooks.py 프로젝트: nicfit/xonsh
 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)