Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug: cd auto-completion of .. fails with parentheses in directory name



Peter Stephenson wrote on Sat, Oct 29, 2016 at 19:39:43 +0100:
> The first step to getting this under control is probably tests.  There
> are some Y01completion tests involving files.  A few with more exotic
> characters plus variables wouldn't hurt.

For starters here's a test for the problem reported at the start of the
thread.  I've verified that it fails when 39412 is reverted.
From e5e7ceb76dd03a4eccad923625530f0d3e658ab1 Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Oct 2016 03:17:20 +0000
Subject: [PATCH] Add a regression test for 39412.

---
 Test/Y01completion.ztst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index 1568369..b3f8be4 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -77,6 +77,16 @@ F:regression test workers/32182
 >FI:{file2}
 F:regression test workers/31611
 
+  {
+    mkdir 'A(B)' 'A(B)/C'
+    comptesteval 'cd "A(B)/C"'
+    comptest $'cd ../\t'
+  } always {
+    rmdir 'A(B)/C' 'A(B)'
+  }
+0:directory name is not a glob qualifier
+>line: {cd ../C/}{}
+
 %clean
 
   zmodload -ui zsh/zpty


Messages sorted by: Reverse Date, Date, Thread, Author