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

Re: Problem with completion after a variable with globcomplete



Oliver Kiddle wrote:

> zsh -f
> autoload -U compinit
> compinit
> setopt globcomplete
> f=/home
> cd $f/okiddle/<tab>
> 
> Here the tab, inserts a space when I would expect it to list directories
> in my home. It seems to be that completion stops working for the second
> directory after a variable reference.

The test if we had a pattern went wrong.

Bye
 Sven

diff -ru ../z.old/Completion/Core/_path_files Completion/Core/_path_files
--- ../z.old/Completion/Core/_path_files	Tue Feb  8 10:16:39 2000
+++ Completion/Core/_path_files	Tue Feb  8 11:06:02 2000
@@ -452,7 +452,7 @@
 
     if (( $#tmp4 )) ||
        [[ -n "$compstate[pattern_match]" &&
-          "$PREFIX$SUFFIX" != "${(q)PREFIX}${(q)SUFFIX}" ]]; then
+          "${PREFIX:s/$//}${SUFFIX:s/$//}" != "${(q)PREFIX:s/$//}${(q)SUFFIX:s/$//}" ]]; then
 
       # It is. For menucompletion we now add the possible completions
       # for this component with the unambigous prefix we have built

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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