Commit 29cbfcd8 authored by Ali Rıza KESKIN's avatar Ali Rıza KESKIN
Browse files support

parent 72f3a700
......@@ -204,7 +204,7 @@ class CLI(inary.ui.UI):
elif ka['operation'] == "fetching":
if not ctx.get_option("no_color"):
if not (ctx.get_option("no_color") or "NO_COLOR" in os.environ):
complated_background = (
ka['foregroundcolor'] or 'backgroundgreen')
queried_background = (
......@@ -58,7 +58,7 @@ all repositories.
self.init(database=True, write=False)
if not (ctx.get_option('no_color')
if not (ctx.get_option('no_color' or "NO_COLOR" in os.environ)
or ctx.config.get_option('uninstalled')):
_('Installed packages are shown in this color.'),
......@@ -57,7 +57,7 @@ def mvprintw(x, y, msg=''):
def noecho(enabled=True):
if not ctx.get_option('no_color'):
if not (ctx.get_option('no_color') or "NO_COLOR" in os.environ):
if enabled:
......@@ -45,7 +45,7 @@ def join_path(a, *p):
def colorize(msg, color):
"""Colorize the given message for console output"""
if ctx.get_option('no_color') or ctx.config.values.general.no_color:
if ctx.get_option('no_color') or ctx.config.values.general.no_color or "NO_COLOR" in os.environ:
return str(msg)
return str(ctx.const.colors[color] + msg + ctx.const.colors['default'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment