Repository: xonsh/xonsh

Issue:
ls broken with $XONSH_COLOR_STYLE = 'bw'
## xonfig

<details>

```
$ xonfig
+------------------+-----------------+
| xonsh            | 0.9.3           |
| Python           | 3.7.3           |
| PLY              | 3.11            |
| have readline    | True            |
| prompt toolkit   | 2.0.9           |
| shell type       | prompt_toolkit2 |
| pygments         | 2.3.1           |
| on posix         | True            |
| on linux         | True            |
| distro           | unknown         |
| on darwin        | False           |
| on windows       | False           |
| on cygwin        | False           |
| on msys2         | False           |
| is superuser     | False           |
| default encoding | utf-8           |
| xonsh encoding   | utf-8           |
| encoding errors  | surrogateescape |
+------------------+-----------------+
```

</details>

## Expected Behavior
`ls works`

## Current Behavior
```
ValueError: when converting 'BACKGROUND_BLACK', did not recognize '0;30' within the following color map as
 a valid color:

{'BLACK': '0;30', 'BLUE': '0;37', 'CYAN': '0;37', 'GREEN': '0;37', 'INTENSE_BLACK': '0;90', 'INTENSE_BLUE'
: '0;97', 'INTENSE_CYAN': '0;97', 'INTENSE_GREEN': '0;97', 'INTENSE_PURPLE': '0;97', 'INTENSE_RED': '0;97'
, 'INTENSE_WHITE': '0;97', 'INTENSE_YELLOW': '0;97', 'NO_COLOR': '0', 'PURPLE': '0;37', 'RED': '0;37', 'WH
ITE': '0;37', 'YELLOW': '0;37', 'BOLD_RED': '1;0;37', 'BOLD_PURPLE': '1;0;37'}
```

### Traceback (if applicable)

<details>

```
Traceback (most recent call last):
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/proc.py"
, line 1856, in __init__
    proc = spec.run(pipeline_group=pipeline_group)
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/built_in
s.py", line 541, in run
    self.prep_env(kwargs)
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/built_in
s.py", line 576, in prep_env
    denv = builtins.__xonsh__.env.detype()
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/environ.
py", line 1364, in detype
    deval = ensurer.detype(val)
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/tools.py
", line 1095, in detype
    return x.detype()
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/environ.
py", line 373, in detype
    for key, val in sorted(self._d.items())
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/environ.
py", line 373, in <listcomp>
    for key, val in sorted(self._d.items())
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/environ.
py", line 371, in <listcomp>
    [ansi_color_name_to_escape_code(v, cmap=style) for v in val]
  File "/nix/store/gazjvyirnxpqkz5rgvv7krcs3i90lbl4-xonsh-0.9.3/lib/python3.7/site-packages/xonsh/ansi_col
ors.py", line 82, in ansi_color_name_to_escape_code
    raise ValueError(msg.format(name, fgcolor, cmap))
ValueError: when converting 'BACKGROUND_BLACK', did not recognize '0;30' within the following color map as
 a valid color:

{'BLACK': '0;30', 'BLUE': '0;37', 'CYAN': '0;37', 'GREEN': '0;37', 'INTENSE_BLACK': '0;90', 'INTENSE_BLUE'
: '0;97', 'INTENSE_CYAN': '0;97', 'INTENSE_GREEN': '0;97', 'INTENSE_PURPLE': '0;97', 'INTENSE_RED': '0;97'
, 'INTENSE_WHITE': '0;97', 'INTENSE_YELLOW': '0;97', 'NO_COLOR': '0', 'PURPLE': '0;37', 'RED': '0;37', 'WH
ITE': '0;37', 'YELLOW': '0;37', 'BOLD_RED': '1;0;37', 'BOLD_PURPLE': '1;0;37'}
```
</details>

## Steps to Reproduce
Execute `ls` with a `.xonsh` consisting of `$XONSH_COLOR_STYLE = 'bw'`

Discussion:

Patch:
diff --git a/news/ansi_colors_style_bw.rst b/news/ansi_colors_style_bw.rst
new file mode 100644
index 00000000..e644c567
--- /dev/null
+++ b/news/ansi_colors_style_bw.rst
@@ -0,0 +1,4 @@
+**Fixed:**
+
+* Style 'bw'. Background colors was added in the style description.
+
diff --git a/news/fix-pred-thrdable-on-win.rst b/news/fix-pred-thrdable-on-win.rst
deleted file mode 100644
index ee81d302..00000000
--- a/news/fix-pred-thrdable-on-win.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-**Added:**
-
-* <news item>
-
-**Changed:**
-
-* <news item>
-
-**Deprecated:**
-
-* <news item>
-
-**Removed:**
-
-* <news item>
-
-**Fixed:**
-
-* Fix causing error in ``get_predictor_threadable`` on windows when try to run not exist command
-
-
-**Security:**
-
-* <news item>
diff --git a/news/hist-gc.rst b/news/hist-gc.rst
deleted file mode 100644
index 6141cc46..00000000
--- a/news/hist-gc.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-**Added:**
-
-* <news item>
-
-**Changed:**
-
-* <news item>
-
-**Deprecated:**
-
-* <news item>
-
-**Removed:**
-
-* <news item>
-
-**Fixed:**
-
-* Fixed issue with ``history gc`` command not running properly.
-
-**Security:**
-
-* <news item>
diff --git a/xonsh/ansi_colors.py b/xonsh/ansi_colors.py
index 25b82e0a..3f58c505 100644
--- a/xonsh/ansi_colors.py
+++ b/xonsh/ansi_colors.py
@@ -343,10 +343,23 @@ def ansi_color_escape_code_to_name(escape_code, style, reversed_style=None):
 
 def _bw_style():
     style = {
+        "NO_COLOR": "0",
         "BLACK": "0;30",
         "BLUE": "0;37",
         "CYAN": "0;37",
         "GREEN": "0;37",
+        "PURPLE": "0;37",
+        "RED": "0;37",
+        "WHITE": "0;37",
+        "YELLOW": "0;37",
+        "BACKGROUND_BLACK": "40",
+        "BACKGROUND_RED": "47",
+        "BACKGROUND_GREEN": "47",
+        "BACKGROUND_YELLOW": "47",
+        "BACKGROUND_BLUE": "47",
+        "BACKGROUND_PURPLE": "47",
+        "BACKGROUND_CYAN": "47",
+        "BACKGROUND_WHITE": "47",
         "INTENSE_BLACK": "0;90",
         "INTENSE_BLUE": "0;97",
         "INTENSE_CYAN": "0;97",
@@ -355,11 +368,6 @@ def _bw_style():
         "INTENSE_RED": "0;97",
         "INTENSE_WHITE": "0;97",
         "INTENSE_YELLOW": "0;97",
-        "NO_COLOR": "0",
-        "PURPLE": "0;37",
-        "RED": "0;37",
-        "WHITE": "0;37",
-        "YELLOW": "0;37",
     }
     return style
 
diff --git a/xonsh/commands_cache.py b/xonsh/commands_cache.py
index f4ebe80c..b62bd0af 100644
--- a/xonsh/commands_cache.py
+++ b/xonsh/commands_cache.py
@@ -231,7 +231,7 @@ class CommandsCache(cabc.Mapping):
             # we get the original cmd or alias name
             path, _ = self.lazyget(name, (None, None))
             if path is None:
-                return predict_true
+                return True
             else:
                 name = pathbasename(path)
             if name not in predictors:
diff --git a/xonsh/history/json.py b/xonsh/history/json.py
index af48bc52..50b6326b 100644
--- a/xonsh/history/json.py
+++ b/xonsh/history/json.py
@@ -97,13 +97,13 @@ class JsonHistoryGC(threading.Thread):
         self.daemon = True
         self.size = size
         self.wait_for_shell = wait_for_shell
+        self.start()
         self.gc_units_to_rmfiles = {
             "commands": _xhj_gc_commands_to_rmfiles,
             "files": _xhj_gc_files_to_rmfiles,
             "s": _xhj_gc_seconds_to_rmfiles,
             "b": _xhj_gc_bytes_to_rmfiles,
         }
-        self.start()
 
     def run(self):
         while self.wait_for_shell:
diff --git a/xonsh/xontribs.json b/xonsh/xontribs.json
index 56072f72..503e7008 100644
--- a/xonsh/xontribs.json
+++ b/xonsh/xontribs.json
@@ -79,14 +79,6 @@
   "url": "https://github.com/xsteadfastx/xonsh-docker-tabcomplete",
   "description": ["Adds tabcomplete functionality to docker inside of xonsh."]
  },
- {"name": "histcpy",
-  "package": "xontrib-histcpy",
-  "url": "https://github.com/con-f-use/xontrib-histcpy",
-  "description": [
-    "Useful aliases and shortcuts for extracting links and text",
-    "from command output history and putting them into the",
-    " clipboard."]
-  },
  {"name": "jedi",
   "package": "xonsh",
   "url": "http://xon.sh",
@@ -274,13 +266,6 @@
     "pip": "xpip install xontrib-avox"
    }
   },
-  "xontrib-histcpy": {
-   "license": "GPLv3",
-   "url": "https://github.com/con-f-use/xontrib-histcpy",
-   "install": {
-    "pip": "xpip install xontrib-histcpy"
-   }
-  },
   "xontrib-z": {
    "license": "GPLv3",
    "url": "https://github.com/astronouth7303/xontrib-z",


Test patch:
diff --git a/tests/test_ansi_colors.py b/tests/test_ansi_colors.py
index 8a907a4a..3625d0d8 100644
--- a/tests/test_ansi_colors.py
+++ b/tests/test_ansi_colors.py
@@ -5,6 +5,7 @@ from xonsh.ansi_colors import (
     ansi_color_escape_code_to_name,
     ansi_reverse_style,
     ansi_color_name_to_escape_code,
+    ansi_color_style_names,
 )
 
 
@@ -119,3 +120,16 @@ def test_ansi_reverse_style(key, value):
 def test_ansi_color_escape_code_to_name(inp, exp):
     obs = ansi_color_escape_code_to_name(inp, "default", reversed_style=RS)
     assert obs == exp
+
+
+@pytest.mark.parametrize(
+    "color, style",
+    [
+        (color, style)
+        for color in DEFAULT_CMAP.keys()
+        for style in ansi_color_style_names()
+    ],
+)
+def test_ansi_color_name_to_escape_code_for_all_styles(color, style):
+    escape_code = ansi_color_name_to_escape_code(color, style)
+    assert len(escape_code) > 0
diff --git a/tests/test_commands_cache.py b/tests/test_commands_cache.py
index b01c1547..9ce54d82 100644
--- a/tests/test_commands_cache.py
+++ b/tests/test_commands_cache.py
@@ -20,12 +20,6 @@ def test_commands_cache_lazy(xonsh_builtins):
     assert 0 == cc.lazylen()
 
 
-def test_predict_threadable_unknown_command(xonsh_builtins):
-    cc = CommandsCache()
-    result = cc.predict_threadable(["command_should_not_found"])
-    assert isinstance(result, bool)
-
-
 TRUE_SHELL_ARGS = [
     ["-c", "yo"],
     ["-c=yo"],