From 74ef9fcd83529aec4fbfc81dffe6736cea85f63e Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 25 Oct 2019 20:51:22 +0300 Subject: [PATCH] escape path separator on windows --- complete.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/complete.go b/complete.go index 79c3252..745f439 100644 --- a/complete.go +++ b/complete.go @@ -262,7 +262,7 @@ func matchFile(s string) (matches []string, longest string) { item := f.Name() if f.Mode().IsDir() { - item += string(filepath.Separator) + item += escape(string(filepath.Separator)) } matches = append(matches, item) @@ -272,7 +272,7 @@ func matchFile(s string) (matches []string, longest string) { if f.Mode().IsRegular() { longest = name + " " } else { - longest = name + string(filepath.Separator) + longest = name + escape(string(filepath.Separator)) } } }