summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/color.map.56
-rw-r--r--pym/emerge/__init__.py6
-rw-r--r--pym/portage/output.py2
3 files changed, 13 insertions, 1 deletions
diff --git a/man/color.map.5 b/man/color.map.5
index f1ace1c25..7a0f1b2ec 100644
--- a/man/color.map.5
+++ b/man/color.map.5
@@ -48,6 +48,12 @@ Defines color used for system packages not planned to be merged.
\fBPKG_NOMERGE_WORLD\fR = \fI"blue"\fR
Defines color used for world packages not planned to be merged.
.TP
+\fBPROMPT_CHOICE_DEFAULT\fR = \fI"green"\fR
+Defines color used for the default choice at a prompt.
+.TP
+\fBPROMPT_CHOICE_OTHER\fR = \fI"red"\fR
+Defines color used for a non\-default choice at a prompt.
+.TP
\fBSECURITY_WARN\fR = \fI"red"\fR
Defines color used for security warnings.
.TP
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index e48e6c085..cbecf9b22 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -135,7 +135,11 @@ def userquery(prompt, responses=None, colours=None):
KeyboardInterrupt is converted to SystemExit to avoid tracebacks being
printed."""
if responses is None:
- responses, colours = ["Yes", "No"], [green, red]
+ responses = ["Yes", "No"]
+ colours = [
+ create_color_func("PROMPT_CHOICE_DEFAULT"),
+ create_color_func("PROMPT_CHOICE_OTHER")
+ ]
elif colours is None:
colours=[bold]
colours=(colours*len(responses))[:len(responses)]
diff --git a/pym/portage/output.py b/pym/portage/output.py
index 1dd45866d..e390b8807 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -147,6 +147,8 @@ codes["PKG_MERGE_WORLD"] = codes["green"]
codes["PKG_NOMERGE"] = codes["darkblue"]
codes["PKG_NOMERGE_SYSTEM"] = codes["darkblue"]
codes["PKG_NOMERGE_WORLD"] = codes["blue"]
+codes["PROMPT_CHOICE_DEFAULT"] = codes["green"]
+codes["PROMPT_CHOICE_OTHER"] = codes["red"]
def parse_color_map(onerror=None):
"""