Repository: xonsh/xonsh

Issue:
Completion traceback on Windows
I am now seeing this on Windows on master (eff2626)

```
(Miniconda) scopa@DESKTOP-EACI0E4 ~ $ cd Exception in thread Thread-24:                                                                                                        Traceback (most recent call last):                                                                                                                                               File "C:\Users\scopa\Miniconda\lib\threading.py", line 914, in _bootstrap_inner                                                                                                  self.run()                                                                                                                                                                   File "C:\Users\scopa\Miniconda\lib\threading.py", line 862, in run                                                                                                               self._target(*self._args, **self._kwargs)                                                                                                                                    File "C:\Users\scopa\Miniconda\lib\site-packages\prompt_toolkit\interface.py", line 836, in run                                                                                  completions = list(buffer.completer.get_completions(document, complete_event))                                                                                               File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\ptk\completer.py", line 42, in get_completions                                                          self.ctx)                                                                                                                                                                    File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\__amalgam__.py", line 124, in complete                                                                  out = func(prefix, line, begidx, endidx, ctx)                                                                                                                                File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\completers\__amalgam__.py", line 1082, in complete_cd                                                   return complete_dir(prefix, line, start, end, ctx, True)                                                                                                                     File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\completers\__amalgam__.py", line 773, in complete_dir                                                   filtfunc=os.path.isdir)                                                                                                                                                      File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\completers\__amalgam__.py", line 765, in complete_path                                                  path_str_end)                                                                                                                                                                File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\completers\__amalgam__.py", line 616, in _quote_paths                                                   (re.search(PATTERN_NEED_QUOTES, s) is not None or                                                                                                                            File "C:\Users\scopa\Miniconda\lib\re.py", line 173, in search                                                                                                                   return _compile(pattern, flags).search(string)                                                                                                                               File "C:\Users\scopa\Miniconda\lib\re.py", line 281, in _compile                                                                                                                 p, loc = _cache[type(pattern), pattern, flags]                                                                                                                               File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\__amalgam__.py", line 250, in __hash__                                                                  obj = self._lazy_obj()                                                                                                                                                       File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\__amalgam__.py", line 190, in _lazy_obj                                                                 obj = d['load']()                                                                                                                                                            File "C:\Users\scopa\AppData\Roaming\Python\Python35\site-packages\xonsh\completers\__amalgam__.py", line 492, in PATTERN_NEED_QUOTES                                            pattern.append('%')                                                                                                                                                        AttributeError: 'str' object has no attribute 'append' 
```



Discussion:
I see the problem, fix incomming.


Resolving patch:
diff --git a/xonsh/completers/path.py b/xonsh/completers/path.py
--- a/xonsh/completers/path.py
+++ b/xonsh/completers/path.py
@@ -14,7 +14,7 @@
 def PATTERN_NEED_QUOTES():
     pattern = r'\s`\$\{\}\,\*\(\)"\'\?&'
     if xp.ON_WINDOWS:
-        pattern.append('%')
+        pattern += '%'
     pattern = '[' + pattern + ']' + r'|\band\b|\bor\b'
     return re.compile(pattern)
 


Test patch:
diff --git a/tests/test_path_completers.py b/tests/test_path_completers.py
new file mode 100644
--- /dev/null
+++ b/tests/test_path_completers.py
@@ -0,0 +1,5 @@
+import xonsh.completers.path as xcp
+
+def test_pattern_need_quotes():
+    # just make sure the regex compiles
+    xcp.PATTERN_NEED_QUOTES.match('')