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

PATCH: Re: file-patterns



Tanaka Akira wrote:

> Z(4):akr@serein% zsh -f
> serein% bindkey -e; autoload -U compinit; compinit -D
> serein% zstyle ':completion:*' file-patterns '%p:globbed-files *(-/):directories' '*:all-files'
> serein% ls 
> %p             Completion/    Doc/           Functions/     Src/           Test/          
> CVS/           Config/        Etc/           Misc/          StartupFiles/  Util/          
> 
> Hm.  `%p' is completed.

That's because `%' isn't special after `${foo//' any more.

Bye
 Sven

Index: Completion/Core/_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_files,v
retrieving revision 1.9
diff -u -r1.9 _files
--- Completion/Core/_files	2000/04/12 12:35:38	1.9
+++ Completion/Core/_files	2000/05/10 07:57:08
@@ -26,7 +26,7 @@
 if zstyle -a ":completion:${curcontext}:" file-patterns tmp; then
   [[ "$type" = */* ]] && glob="$glob,*(-/)"
   pats=()
-  for i in ${tmp//\\%p/${${glob:-\*}//:/\\:} }; do
+  for i in ${tmp//%p/${${glob:-\*}//:/\\:} }; do
     if [[ $i = *[^\\]:* ]]; then
       pats=( "$pats[@]" " $i " )
     else

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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