From 2e3ddb5fc81b8c6f2c93bf1d2659a48d96ec927b Mon Sep 17 00:00:00 2001
From: gwenn <gtreguier@gmail.com>
Date: Fri, 12 Aug 2016 17:51:42 +0200
Subject: [PATCH] Fix file completion on windows.

---
 src/completion.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/completion.rs b/src/completion.rs
index dca94d6d..4ef0216a 100644
--- a/src/completion.rs
+++ b/src/completion.rs
@@ -63,8 +63,13 @@ pub struct FilenameCompleter {
     break_chars: BTreeSet<char>,
 }
 
+#[cfg(unix)]
 static DEFAULT_BREAK_CHARS: [char; 18] = [' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$', '>',
                                           '<', '=', ';', '|', '&', '{', '(', '\0'];
+// Remove \ to make file completion works on windows
+#[cfg(windows)]
+static DEFAULT_BREAK_CHARS: [char; 17] = [' ', '\t', '\n', '"', '\'', '`', '@', '$', '>',
+                                          '<', '=', ';', '|', '&', '{', '(', '\0'];
 
 impl FilenameCompleter {
     pub fn new() -> FilenameCompleter {
-- 
GitLab