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

Re: Use of named directories in completions broken.



Peter Stephenson wrote:

> Still having problems with this...
> 
> % echo ~dev/<TAB>
> 
> does menu completion as expected.
> 
> % echo ~dev/sr<TAB>
> 
> should complete to ~dev/src/ but expands instead (then does completion on
> that the next time round).  Similar problem with plain ~/ .  Here's the
> _expand part of the trace for the first example.  Should that pattern on
> line 36 begin (~*/*| rather than (~*/| ?

Ouch.  Yes.

Bye
  Sven

Index: Completion/Base/Completer/_expand
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/Completer/_expand,v
retrieving revision 1.4
diff -u -r1.4 _expand
--- Completion/Base/Completer/_expand	2001/04/30 11:09:50	1.4
+++ Completion/Base/Completer/_expand	2001/05/02 08:57:18
@@ -33,7 +33,7 @@
 #  [[ "$word" = (\~*/|\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|\$\{*\}?)[^\$\{\}\(\)\<\>?^*#~]# ]] &&
 
 zstyle -T ":completion:${curcontext}:" suffix &&
-  [[ "$word" = (\~*/|*\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|*\$\{*\}?) &&
+  [[ "$word" = (\~*/*|*\$(|[=~#^+])[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]|*\$\{*\}?) &&
      "${(e)word}" != *[][^*?\(\)\<\>\{\}\|]* ]] &&
   return 1
 

-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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